Skip to content
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

Use the Default Button Styles (Windows 11 Styles) #3363

Merged
merged 4 commits into from Nov 17, 2021
Merged

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Nov 12, 2021

Description of Change

By using the default styles that come with WinUI, we can have the nice new Windows 11 theme.

Additions made

  • Removed the MauiButton and MauiButtonStyle
  • Using default Button element and predictable content
  • Using default ButtonPadding
  • Using resources for foreground and background

Other Notes

Right now the padding for the buttons is not super consistent, but that will come in PR #1704 and PR #2597

Pictures

Before After
image image

{
Content = new StackPanel
{
HorizontalAlignment = HorizontalAlignment.Center,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we simplified all this properties using Styles?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we could create a style for the maui buttons, but is it necessary?

public partial class ButtonHandlerTests
{
[Fact(DisplayName = "CharacterSpacing Initializes Correctly")]
public async Task CharacterSpacingInitializesCorrectly()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@mattleibow mattleibow changed the title Use the default Button styles Use the Default Button Styles (Windows 11 Styles) Nov 16, 2021
@mattleibow mattleibow merged commit da7787a into main Nov 17, 2021
@mattleibow mattleibow deleted the dev/win11-button branch November 17, 2021 17:45
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jul 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@Eilon Eilon removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-image Image loading, sources, caching labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants