From dc83109e4da171d23afb5f3305d33b5995d7438a Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 19 Sep 2024 10:09:22 +0200 Subject: [PATCH] Fixed `Button` styles This commit fixes issues with the `VisualStateManager` styles. Fixed #556 --- .../Themes/DefaultColors.xaml | 2 +- .../ViewModels/ButtonsPageViewModel.cs | 2 + .../Views/ButtonsPage.xaml | 245 +++++++++++------- .../Themes/Controls/Core/Button.xaml | 68 ++--- .../Resources/Themes/Controls/Button.xaml | 238 ++++++++++------- 5 files changed, 318 insertions(+), 237 deletions(-) diff --git a/src/SharedMauiXamlStylesLibrary.SampleApp/Themes/DefaultColors.xaml b/src/SharedMauiXamlStylesLibrary.SampleApp/Themes/DefaultColors.xaml index 6ae25191..f17a3be0 100644 --- a/src/SharedMauiXamlStylesLibrary.SampleApp/Themes/DefaultColors.xaml +++ b/src/SharedMauiXamlStylesLibrary.SampleApp/Themes/DefaultColors.xaml @@ -7,7 +7,7 @@ #512BD4 - #512BD4 + #391E94 #edcacd #ffe8f4 #7644ad diff --git a/src/SharedMauiXamlStylesLibrary.SampleApp/ViewModels/ButtonsPageViewModel.cs b/src/SharedMauiXamlStylesLibrary.SampleApp/ViewModels/ButtonsPageViewModel.cs index 846df1a4..0650c260 100644 --- a/src/SharedMauiXamlStylesLibrary.SampleApp/ViewModels/ButtonsPageViewModel.cs +++ b/src/SharedMauiXamlStylesLibrary.SampleApp/ViewModels/ButtonsPageViewModel.cs @@ -10,6 +10,8 @@ public partial class ButtonsPageViewModel : BaseViewModel [ObservableProperty] string sampleText = "This is just a sample text"; + [ObservableProperty] + bool enabled = true; #endregion #region Constructor, LoadSettings diff --git a/src/SharedMauiXamlStylesLibrary.SampleApp/Views/ButtonsPage.xaml b/src/SharedMauiXamlStylesLibrary.SampleApp/Views/ButtonsPage.xaml index d3450e42..1881d97f 100644 --- a/src/SharedMauiXamlStylesLibrary.SampleApp/Views/ButtonsPage.xaml +++ b/src/SharedMauiXamlStylesLibrary.SampleApp/Views/ButtonsPage.xaml @@ -18,104 +18,149 @@ - - -