diff --git a/demo/Semi.Avalonia.Demo/Pages/Overview.axaml b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml index 2e100a2..a2a8569 100644 --- a/demo/Semi.Avalonia.Demo/Pages/Overview.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml @@ -9,18 +9,6 @@ mc:Ignorable="d"> - - - - diff --git a/demo/Semi.Avalonia.Demo/Views/TabMenu.axaml b/demo/Semi.Avalonia.Demo/Themes/TabMenu.axaml similarity index 57% rename from demo/Semi.Avalonia.Demo/Views/TabMenu.axaml rename to demo/Semi.Avalonia.Demo/Themes/TabMenu.axaml index 5c7a38f..0c9ec39 100644 --- a/demo/Semi.Avalonia.Demo/Views/TabMenu.axaml +++ b/demo/Semi.Avalonia.Demo/Themes/TabMenu.axaml @@ -12,27 +12,18 @@ BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index 608e5e0..0074644 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -11,126 +11,160 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs b/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs index 5464c27..b48ee71 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs @@ -1,4 +1,7 @@ +using Avalonia; using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Styling; namespace Semi.Avalonia.Demo.Views; @@ -8,4 +11,14 @@ public partial class MainView : UserControl { InitializeComponent(); } + + private void ToggleButton_OnIsCheckedChanged(object sender, RoutedEventArgs e) + { + var app = Application.Current; + if (app is not null) + { + var theme = app.ActualThemeVariant; + app.RequestedThemeVariant = theme == ThemeVariant.Dark ? ThemeVariant.Default : ThemeVariant.Dark; + } + } } \ No newline at end of file