net90_PropertyGridHelpers.UIEditors_FlagEnumUIEditor 1 - dparvin/PropertyGridHelpers GitHub Wiki

FlagEnumUIEditor<T> class

A generic UITypeEditor for editing flag-style enums in a PropertyGrid, with support for customized display text using a specified EnumConverter.

public class FlagEnumUIEditor<T> : DropDownVisualizer<FlagCheckedListBox>
    where T : EnumConverter, new()
parameter description
T The EnumConverter type used to convert enum values to user-friendly display text. Must have a parameterless constructor.

Public Members

name description
FlagEnumUIEditor() Initializes a new instance of the FlagEnumUIEditor class.

Remarks

This editor uses a FlagCheckedListBox hosted in a dropdown and allows multiple values to be selected for enums decorated with the FlagsAttribute. The generic parameter T allows you to specify a custom converter, such as EnumTextConverter, to localize or stylize enum values. Example:

[Editor(typeof(FlagEnumUIEditor<EnumTextConverter<MyEnum>>), typeof(UITypeEditor))]
[TypeConverter(typeof(EnumTextConverter<MyEnum>))]
public MyEnum Options { get; set; }

See Also

⚠️ **GitHub.com Fallback** ⚠️