-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
For MetroFlatButton
and MetroFlatToggleButton
in the dark theme, the keyboard focus rectangle is light-on-light, so it's really hard to see. I suggest a fix, below.
Repro in MahApps.Metro.NET45:
My suggested fix
I have a fix, as long as you know how to apply this to only the dark theme. To fix the problem, add this to both MetroFlatButton
and MetroFlatToggleButton
styles in the dark theme only:
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Stroke="{DynamicResource FlatButtonForegroundBrush}" StrokeThickness="1" StrokeDashArray="1 2" Margin="2,2,2,2" SnapsToDevicePixels="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
How I got that: I used XamlWriter to extract the default FocusVisualStyle at runtime, then switched from SystemColors.ControlTextBrushKey
to FlatButtonForegroundBrush
.
Environment
- MahApps.Metro v1.6.0-alpha0184
- Windows OS 10
- Visual Studio 2017
- .NET Framework 4.5