WPF DataGridTemplateColumn Visibility Binding under MVVM

后端 未结 5 994
忘掉有多难
忘掉有多难 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:38

    I read somewhere on Stack Overflow(can't find exact post) that the DataGridColumn's aren't assigned a data context because they aren't a FrameworkElement. To get around this, I had to use code similiar to this:

        
                      
                               
                            
              
         
    
    Where 
    
    
         
    
    

提交回复
热议问题