码迷,mamicode.com
首页 > 编程语言 > 详细

Enum Binding ItemsSource In WPF

时间:2015-04-10 15:03:55      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

 

然后我们在实例化这个枚举的时候,调用它就可以。  

 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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
分享档案
周排行
mamicode.com排行更多图片
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!