using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; namespace SukiUI.Controls; public partial class WaveProgress : UserControl { public WaveProgress() { InitializeComponent(); var theme = SukiTheme.GetInstance(); theme.OnBaseThemeChanged += _ => { Value++; Value--; }; theme.OnColorThemeChanged += _ => { Value++; Value--; }; } private void InitializeComponent() { AvaloniaXamlLoader.Load(this); } public static readonly StyledProperty ValueProperty = AvaloniaProperty.Register(nameof(Value), defaultValue: 50); public double Value { get => GetValue(ValueProperty); set { if (value is >= 0 and <= 100) SetValue(ValueProperty, value); } } public static readonly StyledProperty IsTextVisibleProperty = AvaloniaProperty.Register(nameof(IsTextVisible), defaultValue: true); public bool IsTextVisible { get => GetValue(IsTextVisibleProperty); set => SetValue(IsTextVisibleProperty, value); } }