WPF Binding to parent DataContext

前端 未结 2 865
谎友^
谎友^ 2021-01-30 16:37

We have a WPF application with a standard MVVM pattern, leveraging Cinch (and therefore MefedMVVM) for View -> ViewModel resolution. This works well, and I can bind the relevant

2条回答
  •  甜味超标
    2021-01-30 17:00

    I dont know about XamGrid but that's what i'll do with a standard wpf DataGrid:

    
        
            
                
                    
                        
                    
                
                
                    
                        
                    
                
            
        
    
    

    Since the TextBlock and the TextBox specified in the cell templates will be part of the visual tree, you can walk up and find whatever control you need.

提交回复
热议问题