2012年9月12日
摘要: [From:]http://www.cnblogs.com/KeithWang/archive/2012/03/29/2423005.html定义TemplateBinding是为了某个特定场景优化出来的数据绑定版本--需要把ControlTemplate里面的某个Property绑定到应用该ControlTemplate的控件的对应Property上。中文表达比较拗口,MSDN的原文“Links the value of a property in a control template to be the value of a property on the templated contro 阅读全文
posted @ 2012-09-12 23:48 天外飞车 阅读(228) 评论(0) 推荐(0) 编辑
摘要: [From]:http://www.cnblogs.com/huxj/archive/2010/03/04/1678160.html在.net2.0 的版本中的 System.Globalization.ChineseLunisolarCalendar 是针对中国的日历类,公历与中国传统农历纪年之间的相互转换,利用它可以计算天干地支等有关农历的信息。使用static ChineseLunisolarCalendar cCalendar = new ChineseLunisolarCalendar();cCalendar.MaxSupportedDateTime 返回支持的最大日期,即2101- 阅读全文
posted @ 2012-09-12 23:17 天外飞车 阅读(197) 评论(0) 推荐(0) 编辑
摘要: [From]:http://www.cnblogs.com/RMay/archive/2008/07/22/1248905.htmlRichTextBox的文本是一个FlowDocument类型的对象,我们只需要利用XamlReader和XamlWriter就能很好的完成上述工作。【保存Document到流】FlowDocument document = richTextBox.Document;Stream s = new MemoryStream(); // 其他的什么Stream类型都没问题 XamlWriter.Save(document, s);// 拿到s之后,再转化成二进制数据写 阅读全文
posted @ 2012-09-12 23:12 天外飞车 阅读(265) 评论(0) 推荐(0) 编辑