摘要:
Not the prettiest in the book, but you can use the CommandManager to invalidate all commandbinding: CommandManager.InvalidateRequerySuggested();http://stackoverflow.com/questions/1340302/wpf-how-to-f... 阅读全文
摘要:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/030966b3-8140-42c0-b9a8-29e25912e550/start-wpf-application-from-windows-service 阅读全文
摘要:
Refer:http://stackoverflow.com/questions/7275806/what-is-the-difference-between-totalfreespace-and-availablefreespace Remarks (TotalFreeSpace) This property indicates the total amount of free... 阅读全文
摘要:
参考:http://msdn.microsoft.com/zh-cn/library/vstudio/ms788747.aspx 需求,自定义ListView中的滚动条 这岂不是很简单?刷刷刷写完了,可惜死活不管用。 Bing之,发现,要这么写: 主要是第一句: 横向滚动条和纵向滚动条的style就自己写吧。完整的style代码: #FFE8EDF9 #FFC5CBF9 #FF7381... 阅读全文
摘要:
参考: http://blog.csdn.net/fengzhijiaxu/article/details/4827364 http://blog.csdn.net/teng_ontheway/article/details/8307410 1.PreBuild格式化Xaml代码 call $(ProjectDir)..\FormatXaml.exeFormatXaml.exe在项目文件的... 阅读全文
摘要:
class Program { static void Main(string[] args) { //1. Aggregate int[] testArr = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //refer... 阅读全文
摘要:
示例代码:神奇的地方在于yield返回的是一个IEumerable,可以直接枚举。// yield-example.csusing System;using System.Collections;public class List{ public static IEnumerable Power(int number, int exponent) { int counter = 0; int result = 1; while (counter++ < exponent) { result = resul... 阅读全文
摘要:
场景:C++部分封装为COM,C#来调用。调用可能是在线程中的。应用程序退出时,C#的部分 自动清理,某些线程可能还没有完全停掉。COM内部的东西也在释放内存。这个时候,稍有不慎,就会崩溃。冲突点:1. 多个线程重复ReleaseComObject,2. C#某个线程还在使用,另外一个线程或者主线程去ReleaseComObject。3. 已经进行了ReleaseComObject, c#某个线程还在使用。最让人郁闷的地方是: try{ Marshal.ReleaseComObject(obj); obj = null;}catch (System.ArgumentExceptio... 阅读全文
摘要:
http://sc.68design.net/tk/G2/p4 阅读全文
摘要:
SystemParameters.HighContrast Propertyhttp://msdn.microsoft.com/en-us/library/system.windows.systemparameters.highcontrast(v=vs.100).aspxHow to handle highcontrast issue for WPF applicationshttp://social.msdn.microsoft.com/Forums/vstudio/en-US/ba9a379b-4f02-408c-954b-6057e6d0a1b5/how-to-handle-highc 阅读全文