Hi,
You can set a style on the PropertyGridEditorDoubleUpDown and use a trigger to change the color when IsReadOnly is true.
You can set a style on the PropertyGridEditorDoubleUpDown and use a trigger to change the color when IsReadOnly is true.
<Window.Resources>
<Style x:Key="DoubleUpDownStyle"
TargetType="{x:Type xctk:PropertyGridEditorDoubleUpDown}">
<Setter Property="TextAlignment"
Value="Left" />
<Setter Property="Foreground"
Value="Green" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}"
Value="True">
<Setter Property="Foreground"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
....
<xctk:PropertyGrid x:Name="_propertyGrid">
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorTemplateDefinition TargetProperties="UConstruction">
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<xctk:PropertyGridEditorDoubleUpDown Value="{Binding Value}"
IsReadOnly="{Binding Instance.IsUYConstruction}"
Style="{StaticResource DoubleUpDownStyle}"/>
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>