From 691e9987bcf532e478b8abb629e3ef728931a0d6 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Sun, 22 Dec 2024 14:04:35 +0800
Subject: [PATCH] feat: add High-contrast theme doc.
---
.../Pages/HighContrastTheme.axaml | 108 ++++++++++++++++++
.../Pages/HighContrastTheme.axaml.cs | 28 +++++
demo/Semi.Avalonia.Demo/Views/MainView.axaml | 3 +
3 files changed, 139 insertions(+)
create mode 100644 demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml
create mode 100644 demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml.cs
diff --git a/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml b/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml
new file mode 100644
index 0000000..01b2d1b
--- /dev/null
+++ b/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml.cs
new file mode 100644
index 0000000..1146f5c
--- /dev/null
+++ b/demo/Semi.Avalonia.Demo/Pages/HighContrastTheme.axaml.cs
@@ -0,0 +1,28 @@
+using System.Collections.Generic;
+using Avalonia.Controls;
+using Avalonia.Styling;
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Semi.Avalonia.Demo.Pages;
+
+public partial class HighContrastTheme : UserControl
+{
+ public HighContrastTheme()
+ {
+ InitializeComponent();
+ this.DataContext = new HighContrastThemeViewModel();
+ }
+}
+
+public partial class HighContrastThemeViewModel : ObservableObject
+{
+ [ObservableProperty] private ThemeVariant? _selectedThemeVariant = SemiTheme.Aquatic;
+
+ public IEnumerable ThemeVariants =>
+ [
+ SemiTheme.Aquatic,
+ SemiTheme.Desert,
+ SemiTheme.Dust,
+ SemiTheme.NightSky,
+ ];
+}
\ 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 376aee0..ce949a5 100644
--- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml
+++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml
@@ -109,6 +109,9 @@
+
+
+