From 8563ad93c14723de2882b1402543d63b4697af42 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:19:09 +0800
Subject: [PATCH] feat: redesign ButtonToggleSwitch.
(cherry picked from commit 3c8854f9de99baffd70d96ff50fcb8364d37af81)
---
.../Pages/ToggleSwitchDemo.axaml | 83 ++++++++++-------
.../Themes/ToggleSwitch.axaml | 54 ++---------
demo/Semi.Avalonia.Demo/Views/MainView.axaml | 5 +-
src/Semi.Avalonia/Controls/ToggleSwitch.axaml | 91 +++++++++++++++----
4 files changed, 132 insertions(+), 101 deletions(-)
diff --git a/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml
index 1a23866..ed66fc1 100644
--- a/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/ToggleSwitchDemo.axaml
@@ -8,22 +8,23 @@
d:DesignWidth="800"
mc:Ignorable="d">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -44,8 +45,8 @@
-
-
+
+
@@ -60,21 +61,35 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Themes/ToggleSwitch.axaml b/demo/Semi.Avalonia.Demo/Themes/ToggleSwitch.axaml
index 98e1ce6..f3b0485 100644
--- a/demo/Semi.Avalonia.Demo/Themes/ToggleSwitch.axaml
+++ b/demo/Semi.Avalonia.Demo/Themes/ToggleSwitch.axaml
@@ -1,15 +1,8 @@
-
-
-
-
-
+
-
-
-
-
-
@@ -20,48 +13,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml
index de2b2f5..961a24d 100644
--- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml
+++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml
@@ -52,14 +52,11 @@
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ CornerRadius="{TemplateBinding CornerRadius}">
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
\ No newline at end of file