I'm new to Actipro controls (and fairly new to WPF), so this is very possibly (and hopefully) a naïve mistake on my part.
I'm trying to customize the control used for editing the value of a bound property, so I'm using the PropertyGridPropertyItem.ValueTemplate element in my XAML. However, the value I'm binding to within this template appears to be the same value that appears in the NameTemplate (i.e. the label).
Here's a simplified sample:
<propgrid:PropertyGridPropertyItem DisplayName="Version" Value="{Binding Version}" />
<propgrid:PropertyGridPropertyItem DisplayName="VersionX" Value="{Binding Version}" >
<propgrid:PropertyGridPropertyItem.ValueTemplate>
<DataTemplate>
<Label Content="{Binding}" />
</DataTemplate>
</propgrid:PropertyGridPropertyItem.ValueTemplate>
</propgrid:PropertyGridPropertyItem>
The first item (Version) displays correctly, showing the value of the Version property of the bound object.
The second item (VersionX) I would have expected to either:
1. display the value of the VersionX property, or
2. display nothing until the binding was changed to "{Binding Version}".
Instead, it displays the label "VersionX" as both the name and the value. If I use "{Binding Version}", nothing is displayed. I've tried other bindings, but can't find anything that displays the value.
Can someone show me the correct way to do this? Or is this a bug?