net90_PropertyGridHelpers.UIEditors_ResourcePathEditor - dparvin/PropertyGridHelpers GitHub Wiki

ResourcePathEditor class

Provides a UITypeEditor that enables selection of embedded resource paths from a dropdown list in the PropertyGrid.

public class ResourcePathEditor : UITypeEditor

Public Members

name description
ResourcePathEditor() Initializes a new instance of the ResourcePathEditor class.
override IsDropDownResizable { get; } Gets a value indicating whether this instance is drop down resizable.
override EditValue(…) Edits the value.
override GetEditStyle(…) Gets the edit style.
override GetPaintValueSupported(…) Gets the paint value supported.

Remarks

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.

Examples

[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; }

See Also

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