From c9528e4bdcc9219f2a1a948d0c84085e8472bcfb Mon Sep 17 00:00:00 2001 From: SKProCH Date: Tue, 10 Oct 2023 01:34:03 +0300 Subject: [PATCH] Remove app style selector from demo app, since it broken anyway --- .../ShowMeTheXaml.Avalonia.Demo.csproj | 1 - .../Views/MainWindow.xaml | 27 +++++-------------- .../Views/MainWindow.xaml.cs | 18 ------------- 3 files changed, 7 insertions(+), 39 deletions(-) diff --git a/ShowMeTheXaml.Avalonia.Demo/ShowMeTheXaml.Avalonia.Demo.csproj b/ShowMeTheXaml.Avalonia.Demo/ShowMeTheXaml.Avalonia.Demo.csproj index 7db9377..4652edf 100644 --- a/ShowMeTheXaml.Avalonia.Demo/ShowMeTheXaml.Avalonia.Demo.csproj +++ b/ShowMeTheXaml.Avalonia.Demo/ShowMeTheXaml.Avalonia.Demo.csproj @@ -21,7 +21,6 @@ - diff --git a/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml b/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml index e260402..ebce27d 100644 --- a/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml +++ b/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml @@ -13,26 +13,13 @@ - - - - AvaloniaEdit Style - Default Style - - - - Fluent - Simple - - - - + + AvaloniaEdit Style + Default Style + diff --git a/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml.cs b/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml.cs index efa59bb..dea39e4 100644 --- a/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml.cs +++ b/ShowMeTheXaml.Avalonia.Demo/Views/MainWindow.xaml.cs @@ -21,23 +21,5 @@ private void StyleSelector_OnSelectionChanged(object sender, SelectionChangedEve : App.XamlDisplayDefaultStyles; Application.Current!.Styles[1] = styleSource; } - - private void ThemeSelector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { - try { - var theme = (CatalogTheme)((ComboBox)sender).SelectedItem!; - if (theme == CatalogTheme.Fluent) - { - Application.Current!.Styles[0] = App.Fluent; - } - else if (theme == CatalogTheme.Simple) - { - Application.Current!.Styles[0] = App.Simple; - } - } - catch (Exception exception) { - Console.WriteLine(exception); - throw; - } - } } } \ No newline at end of file