net90_PropertyGridHelpers.UIEditors_ResourcePathEditor - dparvin/PropertyGridHelpers GitHub Wiki
Provides a UITypeEditor that enables selection of embedded resource paths from a dropdown list in the PropertyGrid.
public class ResourcePathEditor : UITypeEditor
name | description |
---|---|
ResourcePathEditor() | Initializes a new instance of the ResourcePathEditor class, using the appropriate resource base name extractor for the current target framework. |
override IsDropDownResizable { get; } | Gets a value indicating whether the dropdown UI is resizable. |
override EditValue(…) | Edits the specified value using a dropdown list of resource base names. |
override GetEditStyle(…) | Returns the editing style of the editor, which is DropDown. |
override GetPaintValueSupported(…) | Indicates whether this editor supports painting a visual representation of a value. |
This editor dynamically retrieves available resource paths from the owning assembly and presents them as selectable values. It is commonly used in conjunction with the OnlySelectableTypeConverter
to restrict editing to valid, predefined options and to prevent users from manually typing arbitrary values.
[AllowBlank(includeItem: true, resourceItem: "Blank_ResourcePath")]
[LocalizedCategory("Category_TestItems")]
[LocalizedDescription("Description_ResourcePath")]
[LocalizedDisplayName("DisplayName_ResourcePath")]
[Editor(typeof(ResourcePathEditor), typeof(UITypeEditor))]
[TypeConverter(typeof(OnlySelectableTypeConverter))]
public string ResourcePath { get; set; }
- class OnlySelectableTypeConverter
- class AllowBlankAttribute
- namespace PropertyGridHelpers.UIEditors
- assembly PropertyGridHelpers
- ResourcePathEditor.cs