-
Notifications
You must be signed in to change notification settings - Fork 1
net90_PropertyGridHelpers.Attributes_AllowBlankAttribute_AllowBlankAttribute
dparvin edited this page May 25, 2025
·
10 revisions
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