PunCha

导航

2012年4月1日 #

Path::InvalidPathChars 为什么被作废

摘要: 看到微软把Path::InvalidPathChars标记为Obsolete,觉的很奇怪,查了一下MSDN,发现InvalidPathChars是一个只读的字段(数组类型),而不是属性。调用它不是很安全的,因为恶意代码可以修改该数组的内容,从而造成你的程序不正确运行。解决的方法是调用Path.Get... 阅读全文

posted @ 2012-04-01 10:59 PunCha 阅读(306) 评论(0) 推荐(0)

不同XML之间节点的拷贝

摘要: Original:http://www.aspcode.net/The-node-to-be-inserted-is-from-a-different-document-context.aspxSoon after Irecommended my (just published solution) ... 阅读全文

posted @ 2012-04-01 10:58 PunCha 阅读(449) 评论(0) 推荐(0)

文件操作的 Win32 API

摘要: 需要头文件:shlwapi.h其中有一些函数功能存在重复,我在认为比较常用的的函数上加红。BOOL PathFileExists(LPCTSTR lpszPath)功能:检查文件/路径是否存在LPTSTR PathFindFileName(LPCTSTR pPath)功能:获得路径中的文件名例如:P... 阅读全文

posted @ 2012-04-01 10:56 PunCha 阅读(473) 评论(0) 推荐(0)

StaticResourceExtension DynamicResourceExtension

摘要: StaticResourceExtension 和 DynamicResourceExtension都接受一个ResourceKey的参数,ResourceKey的类型是object类型的,所以不限于string。在Xaml里面,假如参数是String类型的,则可以直接用{StaticResourc... 阅读全文

posted @ 2012-04-01 10:55 PunCha 阅读(235) 评论(0) 推荐(0)

FrameworkPropertyMetadataOptions.Inherits 属性沿袭

摘要: 今天研究了下属性的沿袭(DependencyProperty Inherit),研究之后和原来想象的有些出入:假如我有一个自定义的Button, ClickedButton继承自Button控件,又增加了一个DependencyProperty(设计成可继承的), IsClicked。在XAML里面... 阅读全文

posted @ 2012-04-01 10:52 PunCha 阅读(231) 评论(0) 推荐(0)

Property trigger VS DataTrigger

摘要: Original:http://blog.sina.com.cn/s/blog_4cc3c0380100j9ra.htmlConsider the following screenshot. There is a ListBox which simply hold several string it... 阅读全文

posted @ 2012-04-01 10:50 PunCha 阅读(162) 评论(0) 推荐(0)

ClickOnce报错的解决:VS 2010 RTM returns Error: "Cannot publish because a project failed to build"

摘要: VS 2010 RTM returns Error: "Cannot publish because a project failed to build" ,even though Solution builds fine.Original post:http://connect.microsoft... 阅读全文

posted @ 2012-04-01 10:42 PunCha 阅读(198) 评论(0) 推荐(0)

2012年3月30日 #

WPF:详解创建Lookless自定义控件——文件选择控件

摘要: 转载:作者MGen 原文链接http://www.cnblogs.com/mgen/archive/2012/01/10/2318269.htmlWPF:详解创建Lookless自定义控件——文件选择控件目录-1:控件演示和源代码下载0. 准备工作1. 继承Control类型2. 添加依赖属性3.... 阅读全文

posted @ 2012-03-30 00:05 PunCha 阅读(604) 评论(0) 推荐(0)

2012年3月28日 #

FocusScope学习三: 对FocusScope 的探究与总结

摘要: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/f5de6ffc-fa03-4f08-87e9-77bbad752033/这个帖子很好的讨论了Focus Scope的种种,WeiFen 和John给出了我最接受的总结: 我在最后也给出... 阅读全文

posted @ 2012-03-28 22:15 PunCha 阅读(1915) 评论(0) 推荐(0)

FocusScope学习二: 很好的理解FocusScope的工作原理

摘要: http://www.codeproject.com/Articles/38507/Using-the-WPF-FocusScopeIntroductionOften, it is useful to maintain a separate focus for different parts of ... 阅读全文

posted @ 2012-03-28 21:58 PunCha 阅读(954) 评论(0) 推荐(0)