Wpf extended toolkit propertygrid select editor for all objects of type

I am currently specifying which editor should use the property grid by adding attributes to such properties:

[DisplayName("Background")]
[Editor(typeof(ColorEditor), typeof(ColorEditor))]
public Color Color { get; set; }

I don’t like this because the Color property is in a library that is separate from the user interface project. It doesn't seem right to add user interface attributes to a library other than the UI.

How to indicate that the grid property should always use a specific editor for a specific type? I saw the PropertyGrid documentation and they give a solution to my problem, but they use custom editors. I want to be able to use standard editors.

+4
source share

All Articles