Hi,
I am not sure, but it will be great, if we will be able to do like this:
Define "EditorTemplateDefinition.ResolveEditor" to get editor control for the specified type
For example for String type it will be:
<xctk:EditorTemplateDefinition.ResolveEditor TargetPropertyType="{x:Type sys:String}" ValueDependencyProperty="{Binding Value}" />
The example with label:
I am not sure, but it will be great, if we will be able to do like this:
Define "EditorTemplateDefinition.ResolveEditor" to get editor control for the specified type
For example for String type it will be:
<xctk:EditorTemplateDefinition.ResolveEditor TargetPropertyType="{x:Type sys:String}" ValueDependencyProperty="{Binding Value}" />
The example with label:
<!-- Editor for all properties -->
<xctk:EditorTemplateDefinition TargetProperties="*"> <!-- * - for all properties -->
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- ValueType keeps a type of current Value -->
<xctk:EditorTemplateDefinition.ResolveEditor TargetPropertyType="{Binding ValueType}" ValueDependencyProperty="{Binding Value}" />
<TextBlock Grid.Column="1" Text="Test String" />
</Grid>
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
Thanks,