摘要: 1.查询语法与方法语法 查询语法: var queryResults = from n in names where n.StartsWith("S") select n; 方法语法: var queryResults = names.Where(n=>n.StartsWith("S")); 2.查 阅读全文
posted @ 2017-08-04 17:38 啊j 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 首先上效果图: <!--Combox样式--> <Style TargetType="{x:Type ComboBox}"> <Setter Property="FontSize" Value="16"></Setter> <Setter Property="Width" Value="300">< 阅读全文
posted @ 2017-08-04 17:11 啊j 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 先上效果图: 样式: <!--DataGrid样式--> <Style TargetType="DataGrid"> <Setter Property="RowHeaderWidth" Value="0"></Setter> <Setter Property="AutoGenerateColumns 阅读全文
posted @ 2017-01-13 17:13 啊j 阅读(5565) 评论(0) 推荐(0) 编辑
摘要: 1、利用shell命令,调用进程打印 string pdfPath = “testPrint.xps"; Process proc = new Process { StartInfo = { CreateNoWindow = false, WindowStyle = ProcessWindowSty 阅读全文
posted @ 2017-01-11 12:34 啊j 阅读(1068) 评论(1) 推荐(0) 编辑
摘要: WPF中在对界面进行操作的时候,可能会遇到“调用线程无法访问此对象,因为另一个线程拥有该对象”异常,这是因为WPF中只有UI线程才能操作UI元素,非UI线程要访问UI时就会报异常了。 解决方法: Dispatcher.BeginInvoke()与Invoke()方法。BeginInvoke()异步执 阅读全文
posted @ 2017-01-09 17:27 啊j 阅读(9345) 评论(1) 推荐(5) 编辑
摘要: 最近再用textbox做限制输入时遇到一个莫名其妙的问题: 首先看代码: <TextBox Name="txtip1" Height="40" Width="60" FontSize="20" MaxLength="3" TextChanged="TextBox_TextChanged"> priv 阅读全文
posted @ 2016-11-18 18:47 啊j 阅读(2848) 评论(0) 推荐(0) 编辑