摘要: 如图:解决办法:This exception occurs because of corrupt fonts values in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts). When using WPF printing (System.Printing), it builds a list of fonts by combining the font names from registry and Windows Font Directory path. If th 阅读全文
posted @ 2013-05-21 14:39 GeneralKING 阅读(840) 评论(2) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2012-12-06 16:07 GeneralKING 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 微软的WPF DataGrid中有很多的属性和样式,你可以调整,以寻找合适的(如果你是一名设计师)。下面,找到我的小抄造型的网格。它不是100%全面,但它可以让你走得很远,有一些非常有用的技巧和陷阱。在DataGrid中的最高水平,你可以改变的外观和感觉,通过设置一些:Property Type Values Default AlternatingRowBackground Brush Any Brush Null Background Brush Any Brush Theme default ColumnHeaderHeight Double 0 to any positive do... 阅读全文
posted @ 2012-11-20 17:58 GeneralKING 阅读(37187) 评论(4) 推荐(2) 编辑
摘要: 场景:Public Class A{ Thread thd; public A() { thd=new Thread(new ThreadStart(Demo)); thd.IsBackground=true; thd.Start(); } public Staticvoid Demo() { UI _UI=new UI(); _UI.tb.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,new Action()=>{ _UI.tb.Text="我是描述控件!"; }) 阅读全文
posted @ 2012-11-15 17:51 GeneralKING 阅读(1660) 评论(0) 推荐(1) 编辑
摘要: 1 /// <summary> 2 /// 十进制转换为二进制 3 /// </summary> 4 /// <param name="x"></param> 5 /// <returns></returns> 6 public static string DecToBin(string x) 7 { 8 string z = null; 9 int X = Convert.ToInt32(x); 10 in... 阅读全文
posted @ 2012-10-24 11:27 GeneralKING 阅读(18911) 评论(2) 推荐(4) 编辑
摘要: 首先要知道一点Silverlight因为用户体验所以只能异步调用WCF,而WPF可以异步调用也可以同步调用。两种方法解决:1.WPF要异步调用Thead t=new Thead().....;不就是异步吗?2.在引用WCF的时候选中异步操作即可。 阅读全文
posted @ 2012-10-08 15:18 GeneralKING 阅读(1236) 评论(0) 推荐(2) 编辑
该文被密码保护。 阅读全文
posted @ 2012-09-29 11:08 GeneralKING 阅读(1640) 评论(0) 推荐(0) 编辑
摘要: Ctrl+ECtrl+S 阅读全文
posted @ 2012-09-26 17:38 GeneralKING 阅读(179) 评论(0) 推荐(0) 编辑
摘要: WindowsForm里一个Application.Exit();方法就可以关闭应用程序,释放掉资源。WPF里Application类没有该方法,但是有一个Exit的事件驱动,在WPF应用程序里面关闭程序讲究很多:在WPF应用程序的关闭是有ShutdownMode属性设置,具有3中枚举类型的值:1)OnLastWindowClose 应用程序最后一个窗体关闭时关闭应用程序2)OnMainWindowClose 应用程序主窗体关闭时关闭应用程序3)OnExplicitShutdown 显示调用关闭在OnExplicitShutdown模式下必须显示调用Application实例的ShutDown 阅读全文
posted @ 2012-08-24 18:46 GeneralKING 阅读(24769) 评论(0) 推荐(0) 编辑
摘要: 1 var _IndextifyCode=IndentifyCode.Instance.CreateIndentifyCode(4); 2 3 IndentifyCode.Instance.CreateImage(_IndextifyCode,"image名称",100,35);//100,35大小 4 5 public class IndentifyCode 6 { 7 private static IndentifyCode instance = null; 8 public static IndentifyCode Instance 9 ... 阅读全文
posted @ 2012-07-31 12:13 GeneralKING 阅读(389) 评论(0) 推荐(0) 编辑