【发布时间】:2011-11-10 13:08:00
【问题描述】:
如何将 WPF 和 ItemsSource 绑定到私有属性?
<ComboBox x:Name="xxx" ItemsSource="{Binding Items, Mode=OneWay}"
DisplayMemberPath="ItemName"/>
public partial class ItemBuySellAddEdit : BasePage
{
private List<Item> Items { get; set; }
}
表单加载时将填充项目列表。
【问题讨论】:
-
公共/内部使用绑定。
标签: c# wpf xaml data-binding