Hi! I know how to set a custom style for the field of a property grid but I cant figure out how I am supposed to make that style bound to anything that is relative to the specific PropertyDefinition of that field.
The PropertyGridField's PropertyDefinition is the default source the style's binding. The binding path of the PropertyDefinition might be "Communication.Timeout" but I want to bind the FontWeight property to "Communication.TimeoutProperty.Mode". How can this be done?
Do I have to create a subclass of PropertyDefinition with my own dependency properties on to be able to do this?
<
telerik:RadPropertyGrid
Name
=
"PropertyGrid"
IsGrouped
=
"True"
Item
=
"{Binding SelectedItem}"
EditMode
=
"Single"
RenderMode
=
"Flat"
FieldStyle
=
"{DynamicResource PropertyGridFieldStyle}"
AutoGeneratePropertyDefinitions
=
"False"
>
<
telerik:RadPropertyGrid.Resources
>
<
Style
x:Key
=
"PropertyGridFieldStyle"
TargetType
=
"{x:Type telerik:PropertyGridField}"
BasedOn
=
"{StaticResource PropertyGridFieldStyle}"
>
<
Setter
Property
=
"FontWeight"
Value
=
"{Binding Path=???}"
/>
</
Style
>
</
telerik:RadPropertyGrid.Resources
>
</
telerik:RadPropertyGrid
>