Method SetFlagNames
SetFlagNames(Func<TEnum, string>)
Set the display names for the flags.
public void SetFlagNames(Func<TEnum, string> nameSelector)
Parameters
Examples
// Use enum values with custom display names
var flagSelector = new FlagSelector<FlagSelectorStyles>();
flagSelector.SetFlagNames(f => f switch {
FlagSelectorStyles.ShowNone => "Show None Value",
FlagSelectorStyles.ShowValueEdit => "Show Value Editor",
FlagSelectorStyles.All => "Everything",
_ => f.ToString()
});
Remarks
This method allows changing the display names of the flags while keeping the flag values hard-defined by the enum type.