
I'm using one of the predefined themes, but I apply some tint to it.
What's the easiest way to prevent disabled text from being tinted?
I would like to use SystemColors.GrayTextColor for all disabled text.
I'm using one of the predefined themes, but I apply some tint to it.
What's the easiest way to prevent disabled text from being tinted?
I would like to use SystemColors.GrayTextColor for all disabled text.
Hi Ralph,
You might need to explicitly redefine the brushes in Application.Resources that are used for disabled text rendering, like this:
<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.ControlForegroundDisabledBrushKey}" Color="#6D6D6D" />
That shows how to override any resource brush (like the tinted ones) coming from our theme.
It didn't work for me as I was applying the tinted theme only to the Ribbon, not to the entire application.
What worked for me was overriding AssetResourceKeys in the Ribbon resources:
<ribbon:Ribbon>
<ribbon:Ribbon.Resources>
<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.ToolBarButtonForegroundDisabledBrushKey}" Color="{DynamicResource {x:Static SystemColors.GrayTextColorKey}}" />
</ribbon:Ribbon.Resources>
<!-- STUFF -->
</ribbon:Ribbon>
Please log in to a validated account to post comments.