2016-07-27 37 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

回答

相關問題