Hi,
I'm trying to use multi-seleciton in PropertyGrid and the following problems occurred:
1. When I set SelectionMode to multi in Xaml and try to switch it to Single mode in code-behind, it doesn't work.
2. When I set NestedPropertiesVisibility="Visible", it worked fine in the single selection mode, but doesn't work in the multi selection mode.
3. Data Annotations set in the Display attriute doesn't work.
3. DataTemplateSelection does not work properly as in the single selection. For example, I get
PropertyType : {Name = "Object" FullName = "System.Object"} System.Type {System.RuntimeType}
for the code below.
I'm trying to use multi-seleciton in PropertyGrid and the following problems occurred:
1. When I set SelectionMode to multi in Xaml and try to switch it to Single mode in code-behind, it doesn't work.
2. When I set NestedPropertiesVisibility="Visible", it worked fine in the single selection mode, but doesn't work in the multi selection mode.
3. Data Annotations set in the Display attriute doesn't work.
3. DataTemplateSelection does not work properly as in the single selection. For example, I get
PropertyType : {Name = "Object" FullName = "System.Object"} System.Type {System.RuntimeType}
for the code below.
public class PropertyGridDataTemplateSelector : DataTemplateSelector
{
public override DataTemplate SelectTemplate(object item, DependencyObject container)
{
if (item as PropertyDefinition != null && (item as PropertyDefinition).SourceProperty.PropertyType == typeof(Int32))
{
return IntegerPropertyDataTemplate;
}
return null;
}
public DataTemplate IntegerPropertyDataTemplate { get; set; }
}
Can you get this fixed?
Thanks!