feat: Add ProgressButton control and demo.

This commit is contained in:
NaBian committed 2026-06-20 16:35:26 +08:00
1 parent d50c08c629
commit c48a634220
8 files changed
+526 -20

No files matched your search

@@ -0,0 +1,26 @@
using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Styling;
namespace HandyControl.Controls;
public class ProgressButton : ToggleButton
{
public static readonly StyledProperty<ControlTheme?> ProgressThemeProperty =
AvaloniaProperty.Register<ProgressButton, ControlTheme?>(nameof(ProgressTheme));
public static readonly StyledProperty<double> ProgressProperty =
AvaloniaProperty.Register<ProgressButton, double>(nameof(Progress));
public ControlTheme? ProgressTheme
{
get => GetValue(ProgressThemeProperty);
set => SetValue(ProgressThemeProperty, value);
}
public double Progress
{
get => GetValue(ProgressProperty);
set => SetValue(ProgressProperty, value);
}
}