阅读背景:

如何访问从ListBox WPF MVVM中选择的对象的属性

来源:互联网 

I have a list box bound to an observable object in my ViewModel. When the user selects an item in the listbox the SelectedItem fires the "SelectedSandwich" property. The value is saved to a private field. The properties SandwichName and Description are properties of the Sandwich object. I want text blocks in my view to show selected sandwichname and price, but I don't want to bind these text blocks to the listbox element. Here is the view: 'I have a list box bound to an observable object




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: