Simple ListView data binding

前端 未结 2 1545
伪装坚强ぢ
伪装坚强ぢ 2021-01-18 12:13

I\'m trying to display data in a ListView with WPF and C#, and I\'m confused by the different examples and methods I have seen. I\'m looking for a fully working

2条回答
  •  无人共我
    2021-01-18 13:03

    You must specify source otherwise, like in your case, it will look for the property in current context which by default, if nothing else is specified, will be DataContext. Try something like this:

    
    

    Like that you specify that it should look for Rows in current Window

提交回复
热议问题