How to set fontcolor with toggle button in high contrast wpf

238 Views Asked by At

In my app, when the toggle button is checked, I set a color for Foreground like this:

 <Trigger Property="IsChecked" Value="True">
            <Setter Property="Background">
                <Setter.Value>
                    <ImageBrush ImageSource="../Images/tab.png"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="#0261A5"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
        </Trigger>

But it is not display well in High Contrast mode, I can set the background as transparent in High Contrast mode, but how to set Foreground to system color?

0

There are 0 best solutions below