spiegelp / MaterialDesignExtensions

Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
https://spiegelp.github.io/MaterialDesignExtensions/
MIT License
767 stars 123 forks source link

Wrong Foreground style set for FlatButton #166

Open Blinchik91 opened 2 years ago

Blinchik91 commented 2 years ago

Hi there,

I found a bug in "MaterialDesignTheme.Button.xaml" . There is a wrong foreground style set for MaterialDesignFlatButton.

    <Style x:Key="MaterialDesignFlatButton" TargetType="{x:Type ButtonBase}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}"/>

The button text eg. in OpenDialog in Darkmode is not readable because it has nearly the same color as the background. It has to be "MaterialDesignBody" instead of "PrimaryHueMidBrush"

Because we want to switch the light modes

Can someone fix it ?