登录
首页 » C# » WPF基础控件应用

WPF基础控件应用

于 2013-11-25 发布
0 211
下载积分: 1 下载次数: 0

代码说明:

常用的20多个基础控件的应用实例

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • C# web QQ登陆示例
    C# web QQ登陆示例
    2014-04-21下载
    积分:1
  • .net 邮件批量发送功能源码下载
    .net 邮件批量发送功能源码下载
    2014-03-01下载
    积分:1
  • 在 web网站、winform、控制台使用log4net实例源码下载
    在 web网站、winform、控制台使用log4net实例源码下载
    2014-07-22下载
    积分:1
  • C# 虚拟路由助手、虚拟wifi 源码下载
    C# 虚拟路由助手、虚拟wifi 源码下载
    2015-05-31下载
    积分:1
  • 串口调试助手代码(XCOM V2.0)
    【实例简介】 很优秀的串口调试助手代码
    2021-08-05 00:31:11下载
    积分:1
  • winform窗体换肤功能实现
    winform 换新皮肤
    2013-01-07下载
    积分:1
  • IC卡二次开发实例
    IC卡二次开发实例
    2014-08-01下载
    积分:1
  • CrystalDiskMark硬盘测试工具 源码
    CrystalDiskMark硬盘测试工具 源码
    2019-08-17下载
    积分:1
  • xml 加密 解密 文件内容
    xml 加密 解密 文件内容
    2014-03-15下载
    积分:1
  • 696518资源总数
  • 106235会员总数
  • 12今日下载