Alias for EditorAttribute
Posted
by Johan
on Stack Overflow
See other posts from Stack Overflow
or by Johan
Published on 2010-04-05T14:50:46Z
Indexed on
2010/04/05
14:53 UTC
Read the original article
Hit count: 299
c#
|attributes
Is there a way to create a shorter alias for an EditorAttribute? Instead of:
[EditorAttribute(typeof<ColorPickerDialogPropertyValueEditor>, typeof<DialogPropertyValueEditor>)]
public Color4 Color { get; set; }
I would like to write:
using ColorPicker = EditorAttribute(typeof<ColorPickerDialogPropertyValueEditor>, typeof<DialogPropertyValueEditor>)
[ColorPicker]
public Color4 Color { get; set; }
Unfortunately the EditorAttribute class is sealed so I cannot inherit it.
© Stack Overflow or respective owner