public override void ToggleValue() { try { var currentIndex = AllowedValues.IndexOf(Value); var newIndex = currentIndex + 1 >= AllowedValues.Count ? 0 : currentIndex + 1; Value = AllowedValues[newIndex]; } catch { Value = (string)DefaultValue; } }
public int ToIntValue() { return(AllowedValues.IndexOf(Value)); }