Silverlight 在运行时更改 ControlTemplate
摘要:You cannot create a ControlTemplate in Silverlight in C# alone. Unlike WPF (where you can set the VisualTree property), there is no property you can s...
阅读全文
posted @
2015-05-07 17:50
tailss
阅读(252)
推荐(0)
silverlight4/5 修改源码实现 DataGrid 中文按拼音排序(第二版)
摘要:先前已经实现的方法需要修改多个dll:排序:System.Windows.Data.dllDataGrid:System.Windows.Controls.Data.dllDataForm:System.Windows.Controls.Data.DataForm.Toolkit.dll问题在于System.Windows.Data.dll经常被其它SDK引用,这样就需要修改强签名,今天有时间看了看排序的代码,问题出现在这里:System.Windows.Data\PagedCollectionView\PagedCollectionView.cspublic CultureSensitive
阅读全文
posted @
2013-10-25 17:24
tailss
阅读(249)
推荐(0)
DataGrid 简单自定义表头插入CheckBox实现全选/全不选
摘要:有这样的一个DataGrid:想要实现选择列全选/全不选功能,应该在表头也加个CheckBox最合适。问Google,写成了下面的样子: 运行起来直接抛异常,继续问Google,也有人提到同样的问题,给出的办法是改用:DataGridTemplateColumn.HeaderStyle,如法炮制: localprimitives的名字空间为:xmlns:localprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"这回果然正常运行
阅读全文
posted @
2013-08-30 18:12
tailss
阅读(1318)
推荐(0)
silverlight4/5 修改源码实现 DataGrid 中文按拼音排序
摘要:silverlight3的DataGrid中文按拼音排序,silverlight4/5不是,本文通过修改SDK DLL实现silverlight3的拼音排序。老项目还是silverlight3的,升级silverlight4后,DataGrid不按拼音排序,用户意见很大,只得着手解决。网上常见解决方案是捕捉点击事件,自定义排序,我也照葫芦画瓢实现了,但用到DataGrid地方都要修改,以后用到DataGrid都要带个小尾巴,着实不便。继续问Google,发现国外论坛一片骂声,silverlight5没提供源代码,也就是说...天可怜见,DataGrid有源代码,silverlight3/4都有
阅读全文
posted @
2013-08-29 16:42
tailss
阅读(575)
推荐(0)