-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flat button style is theme-agnostic #3537
Comments
See also #3328 |
Totally agree on this, themed flat button would be the way to go. |
Definitely I would to have this available. I was search for an themed flat button but the only "themed" button with MahApps.Metro, change the text case to lowercase, and that solid border ... no way. |
Hi Together, <Style x:Key="My.Buttons.Styles.Win10.Accented"
BasedOn="{StaticResource MahApps.Styles.Button.Flat}"
TargetType="Button">
<Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Gray8}" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Black}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Accent}" />
</Trigger>
</Style.Triggers>
</Style> Happy coding |
Add a new Win10 button style, fonts and brushes. - new style MahApps.Styles.Button.Win10 - new font family MahApps.Fonts.Family.ContentControlTheme - new font size MahApps.Font.Size.ControlContentTheme - new brush keys - MahApps.Brushes.Button.Background - MahApps.Brushes.Button.BackgroundPointerOver - MahApps.Brushes.Button.BackgroundPressed - MahApps.Brushes.Button.BackgroundDisabled - MahApps.Brushes.Button.Foreground - MahApps.Brushes.Button.ForegroundPointerOver - MahApps.Brushes.Button.ForegroundPressed - MahApps.Brushes.Button.ForegroundDisabled - MahApps.Brushes.Button.BorderBrush - MahApps.Brushes.Button.BorderBrushPointerOver - MahApps.Brushes.Button.BorderBrushPressed - MahApps.Brushes.Button.BorderBrushDisabled
Add a new Win10 button accent style and brushes. - new style MahApps.Styles.Button.Accent.Win10 - new brush keys - MahApps.Brushes.Button.AccentBackground - MahApps.Brushes.Button.AccentBackgroundPointerOver - MahApps.Brushes.Button.AccentBackgroundPressed - MahApps.Brushes.Button.AccentBackgroundDisabled - MahApps.Brushes.Button.AccentForeground - MahApps.Brushes.Button.AccentForegroundPointerOver - MahApps.Brushes.Button.AccentForegroundPressed - MahApps.Brushes.Button.AccentForegroundDisabled - MahApps.Brushes.Button.AccentBorderBrush - MahApps.Brushes.Button.AccentBorderBrushPointerOver - MahApps.Brushes.Button.AccentBorderBrushPressed - MahApps.Brushes.Button.AccentBorderBrushDisabled
Add a new flat button accent style. - new style MahApps.Styles.Button.Flat.Accent
Is your feature request related to a problem? Please describe.
The current flat button style is theme-agnostic. In Windows 10, these flat buttons style based on the selected theme. For those designing apps more in line with Win10, it would be nice to see a themed flat button style. Current behavior:
Light theme:
Dark theme:
Describe the solution you'd like
Add a
ThemedFlatButton
resource dictionary that styles the buttons as appropriate for Win10:Additional context
I am currently using MahApps.Metro 1.6.5 with VS2019 on Win10 1809. The screenshot is above is from Visual Studio but that's not the only place themed flat buttons exist.
Edit: Current resource dictionaries:
Buttons on above form:
Closed Issues
#3118 fixes the Win81 style for the button.
The text was updated successfully, but these errors were encountered: