WPF中ComboBox控件的Item属性怎么绑定一个枚举

2025-01-05 11:54:47
推荐回答(1个)
回答1:

很简单:

   cbx.ItemsSource = Enum.GetValues(typeof(HorizontalAlignment));
   //绑定了HorizontalAlignment枚举