I am converting my application to the 2017 version of Grids/PropertyGrid and Editors. I am always using DataObjects on the PropertyGrid where sometimes there is only one item and sometimes there are multiple items of either the same or different types.
For selecting the appropriate Editors I always use the [EditorAttribute] on properties or allow the default to be selected. I have found that when a single item is selected the expected Editor template is selected, but when mutliple objects are selected, the default is always selected, even when the selected objects are all of the same type and thus have the same [EditorAttribute] value.
As an example, I have an "AlignmentEditor" which is a custom Editor that selects from an enum of text Alignments (e.g. Left, Center, Right.)
My Alignment property has the attribute set like this: [Editor(typeof(AlignmentPropertyEditor), typeof(PropertyEditor))]
If I have a single Label item selected I get my custom Editor shown in the Property Grid just fine. If I select two or more Label items selected, the PropertyGrid drops down to the default Enum editor (a ComboBox type editor) instead.
When I check the PropertyModel that I get for my custom Editors the IsMergeable is set to True.
How can I get the old behavior where if the [EditorAttributes] and Names of the multiple objects match, you get the desired Editor rather than the default?