标签:
然后我们在实例化这个枚举的时候,调用它就可以。
public Dictionary<TableSelectedType, string> TableSelectedTypeDictionary { get; set; }
public ConboBoxEnum()
{
InitializeComponent();
TableSelectedTypeDictionary=new Dictionary<TableSelectedType, string>();
TableSelectedTypeDictionary.Add(TableSelectedType.SelectedOne, EnumHelper.GetDescription(TableSelectedType.SelectedOne));
TableSelectedTypeDictionary.Add(TableSelectedType.SelectedTwo, EnumHelper.GetDescription(TableSelectedType.SelectedTwo));
TableSelectedTypeDictionary.Add(TableSelectedType.SelectedThird, EnumHelper.GetDescription(TableSelectedType.SelectedThird));
this.DataContext = this;
}
Enum Binding ItemsSource In WPF
标签:
原文地址:http://www.cnblogs.com/changbaishan/p/4414579.html