2016-07-27 73 views
1

我希望我可以使用我的自定义版本替换DataGrid中的标准DataGridRow如何使用WPF DataGrid中的自定义DataGridRow替换标准DataGridRow

public class MyDataGridRow : DataGridRow 
{ ... } 

我知道我可以代替的标准DataGridRowTemplate,但我希望完全替代它,因为它会打开很多像引进新的属性,事件等

它应该是可能的选择,我认为。

您的想法!

与可能的重复相比,问题更加清晰:How can I add Dependency Property to a DataGridRow WPF。我的问题标题和问题内容更有帮助,更一般。就像之前发布这个问题,我搜索了很多,但无法找到任何东西。

+1

的可能的复制[我如何添加依赖项属性的DataGridRow WPF(http://stackoverflow.com/questions/24104080/how-can-i-add-

public class DataGridRowEx : DataGridRow { // you can add any custom dependency property here } public class DataGridEx : DataGrid { //... protected override DependencyObject GetContainerForItemOverride() { return new DataGridRowEx(); } } 

回答依赖属性到一个-datagridrow-WPF) – ASh

回答

相关问题