Are “{Binding Path=.}” and “{Binding}” really equal

后端 未结 4 1427
夕颜
夕颜 2020-11-28 08:44

In my WPF project, I have a ListBox that displays items from a List collection. I wanted to make the text of these items editable, so I wrapped ea

4条回答
  •  长情又很酷
    2020-11-28 09:08

    These are not the same. If you bind this where ConsoleMessages is an ObservableCollection string with just {Binding} you get a "Two-way binding requires Path or XPath." exception where as {Binding Path=.} works. This is with WPF 4.0...

        
            
                
                    
                
            
        
    

    My 2p worth...

提交回复
热议问题