I hope this is a simple answer as I am just learning WPF.
I have a resource dictionary that defines all our styles. Currently, the flag style looks like this:
<Style x:Key="StandardCheckboxStyle" TargetType="{x:Type CheckBox}"> <Setter Property="Foreground" Value="{Binding Source={StaticResource BrandInfo}, XPath=//Colors/@TextColor}"/> <Setter Property="FontSize" Value="12"/> </Style>
The XPath stuff is that the end user can theoretically change the color palette. There is an XML file that explicitly supports the colors we use. Currenlty TextColor is white, and the background for the application is dark gray. Obviously, if the checkbox is disabled and the text is grayed out, we lose a lot of contrast.
So, how did you change the color of the checkbox text if it is set IsEnabled = "False"?
source share