public static void EnumAdded(DependencyObject d, DependencyPropertyChangedEventArgs e) { object value = d.GetValue(EnumBindingProperty); bindedValue = value; dictionary = EnumDataSource.GetLocalizedValues(value.GetType()); }
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem) { if (UseLocalizedValues) { this.DisplayMemberPath = "Value"; this.SelectedValueMemberPath = "Value"; ItemsSourceBinding = new Binding() { Source = EnumDataSource.GetLocalizedValues(DataType) }; } else { ItemsSource = EnumDataSource.GetAvailableValues(DataType); } return(base.CreateCellElement(cell, dataItem)); }