Hello,
Today, I added support for multiple selection in our tool. We are using the WPF RadPropertyGrid.
So we modified the control to use :
SelectionMode="Multiple" and PropertySetMode="Intersection".
I am using the EditorTemplateSelector to select a custom editor for some class types such as "Point".
Before I did this when the PropertyGrid is in single selection mode:
if (item as PropertyDefinition != null && (item as PropertyDefinition).SourceProperty.PropertyType == typeof(System.Windows.Point))
{
return PointPropertyDataTemplate;
}
Now, with multiple selection, the SourceProperty.PropertyType is always of type System.Object. I understand it is now pointing to a dynamic model but it is still be important to keep the original type somewhere else in the parameter. It doesn't make sense to me to add a massive switch case with ALL (over 400) parameters hardcoded "names", and this create software very hard to maintain. I've read that you are working on the Editor Template Attribute that we could set in code but still I want to rely on the class type for single and multiple selection to avoid filling code with redundant attribute.
Do you have any suggestion for this?
Also, having new converters for every class type when using multiple selection is also making my software filled with dozens of converter classes. Why is multiple selection absolutely require this as the property of every selected object is of the same type.
Thank you
Simon
Today, I added support for multiple selection in our tool. We are using the WPF RadPropertyGrid.
So we modified the control to use :
SelectionMode="Multiple" and PropertySetMode="Intersection".
I am using the EditorTemplateSelector to select a custom editor for some class types such as "Point".
Before I did this when the PropertyGrid is in single selection mode:
if (item as PropertyDefinition != null && (item as PropertyDefinition).SourceProperty.PropertyType == typeof(System.Windows.Point))
{
return PointPropertyDataTemplate;
}
Now, with multiple selection, the SourceProperty.PropertyType is always of type System.Object. I understand it is now pointing to a dynamic model but it is still be important to keep the original type somewhere else in the parameter. It doesn't make sense to me to add a massive switch case with ALL (over 400) parameters hardcoded "names", and this create software very hard to maintain. I've read that you are working on the Editor Template Attribute that we could set in code but still I want to rely on the class type for single and multiple selection to avoid filling code with redundant attribute.
Do you have any suggestion for this?
Also, having new converters for every class type when using multiple selection is also making my software filled with dozens of converter classes. Why is multiple selection absolutely require this as the property of every selected object is of the same type.
Thank you
Simon