From e675699f9cca22722641cb5d1854bd6efe79aaf1 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Fri, 24 Feb 2023 00:42:08 +0800 Subject: [PATCH] feat: use toggleswitch in demo. --- .../Themes/ToggleButton.axaml | 30 ------------------- demo/Semi.Avalonia.Demo/Views/MainView.axaml | 20 +++++++++++-- src/Semi.Avalonia/Controls/ToggleSwitch.axaml | 9 ++++-- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/demo/Semi.Avalonia.Demo/Themes/ToggleButton.axaml b/demo/Semi.Avalonia.Demo/Themes/ToggleButton.axaml index 140bf91..acbfbff 100644 --- a/demo/Semi.Avalonia.Demo/Themes/ToggleButton.axaml +++ b/demo/Semi.Avalonia.Demo/Themes/ToggleButton.axaml @@ -1,35 +1,5 @@ - - - - - - - - - - - - - - diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index 5633d11..d6a88ef 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -38,10 +38,26 @@ Classes="Secondary" Text="{Binding #tab.SelectedItem.Header}" /> - + Theme="{DynamicResource ButtonToggleSwitch}"> + + + + + + + diff --git a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml index f7da317..fe1de04 100644 --- a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml +++ b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml @@ -166,15 +166,18 @@ x:Key="ButtonToggleSwitch" BasedOn="{StaticResource {x:Type ToggleSwitch}}" TargetType="ToggleSwitch"> + + + - +