mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-15 13:46:35 +08:00
28 lines
694 B
C#
28 lines
694 B
C#
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<ThemeVariant> ThemeVariants =>
|
|
[
|
|
SemiTheme.Aquatic,
|
|
SemiTheme.Desert,
|
|
SemiTheme.Dust,
|
|
SemiTheme.NightSky,
|
|
];
|
|
} |