WPF DataGridTemplateColumn Visibility Binding under MVVM

后端 未结 5 1126
忘掉有多难
忘掉有多难 2021-01-15 00:58

I have a DataGrid bound to an ICollectionView in my ViewModel. The DataGrid is inside a UserControl which is used in a few different data scenarios, some of which require ce

5条回答
  •  生来不讨喜
    2021-01-15 01:42

    To use RelativeSource.Self as a RelativeSource binding for a DataGridTemplateColumn - you need to add the DataGridContextHelper to your application. This is still required for the WPF 4 DataGrid.

    
                      
                               
                            
              
         
    

提交回复
热议问题