net472_PropertyGridHelpers.UIEditors_ImageTextUIEditor - dparvin/PropertyGridHelpers GitHub Wiki
Provides a UITypeEditor for editing enumeration values that have associated images.
public class ImageTextUIEditor : UITypeEditor, IDisposable
name | description |
---|---|
ImageTextUIEditor(…) | Initializes a new instance of the ImageTextUIEditor class. (2 constructors) |
Dispose() | Releases unmanaged and - optionally - managed resources. |
override GetPaintValueSupported(…) | return that the editor will paint the items in the drop-down |
override PaintValue(…) | Paint the value in the drop-down list |
static GetImageFromEmbeddedResource(…) | Gets the image from embedded resource. |
static GetImageFromFile(…) | Gets the image from file. |
static GetImageFromResource(…) | Gets the image from resource. |
static GetImageFromResourceFile(…) | Gets the image from resource file. |
static GetModuleName(…) | Gets the name of the module. |
static GetTargetSizes(…) | Gets the target sizes. |
struct TargetSizes | Target sizes for the image |
This editor is designed to display an enumeration in a UI with each value optionally associated with an image. The editor can be customized to include additional functionality or presentation enhancements.
To use this editor, apply the ImageTextUIEditor
to an enum property:
[Editor(typeof(ImageTextUIEditor), typeof(UITypeEditor))]
public TestEnum EnumWithImages { get; set; }
Ensure that the enum has descriptions or resources set up using the EnumImageAttribute
to provide the images.
- namespace PropertyGridHelpers.UIEditors
- assembly PropertyGridHelpers
- ImageTextUIEditor.cs