【发布时间】:2014-02-13 10:09:00
【问题描述】:
我有这个模型:
public class Device {
public string Name { get; set; }
public SomeOtherType SomeOtherStuff { get; set; }
}
还有这份清单:
ObservableCollection<Device> DevicesCollection { get; set; }
我不时更改。
我也使用了自定义的UserControl,这样:
<my:MyCustomListControl ItemsSource="{what goes here???}" />
此控件用法应该显示所有Devices 的列表,但只显示它们的Name 属性。
那么如何将ItemsSource 仅绑定到集合的Name 属性?
【问题讨论】:
标签: c# wpf xaml data-binding