net90_PropertyGridHelpers.Attributes_AllowBlankAttribute_AllowBlankAttribute - dparvin/PropertyGridHelpers GitHub Wiki
Specifies whether a blank (empty) value is allowed for a property, typically used in dropdown editors.
public AllowBlankAttribute(bool allow = true, bool includeItem = false, string resourceItem = "")
parameter | description |
---|---|
allow | if set to true allow blank values in the property. |
includeItem | if set to true include item in the dropdown to indicate blank. |
resourceItem | The resource item to use for displaying the blank item (Leaves it empty when this is not provided). |
This attribute is used in conjunction with editors like ResourcePathEditor
and converters like OnlySelectableTypeConverter
to optionally include a blank entry in the list of selectable values.
[AllowBlank(includeItem: true, resourceItem: "Blank_DisplayText")]
[Editor(typeof(ResourcePathEditor), typeof(UITypeEditor))]
[TypeConverter(typeof(OnlySelectableTypeConverter))]
public string ResourcePath { get; set; }
- class ResourcePathEditor
- class OnlySelectableTypeConverter
- class AllowBlankAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers