public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
if (EnumType == null)
{
throw new InvalidOperationException("EnumType must be set before calling GetStandardValues");
}
values.Clear();
foreach (var value in Enum.GetNames(EnumType))
{
values.Add(value);
}
StandardValuesCollection svc = new StandardValuesCollection(values);
return svc;
}