Posted 7 months ago by Ralph
Version: 18.1.0675
Avatar

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.

Comments (2)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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.


Actipro Software Support

Posted 7 months ago by Ralph
Avatar

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>
The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.