using Avalonia; using Avalonia.Controls; using Avalonia.Media; using Avalonia.Metadata; namespace HandyControl.Controls; /// /// 徽章 /// public class Shield : Button { public static readonly StyledProperty SubjectProperty = AvaloniaProperty.Register(nameof(Subject)); public string? Subject { get => GetValue(SubjectProperty); set => SetValue(SubjectProperty, value); } public static readonly StyledProperty StatusProperty = AvaloniaProperty.Register(nameof(Status)); [Content] public object? Status { get => GetValue(StatusProperty); set => SetValue(StatusProperty, value); } public static readonly StyledProperty ColorProperty = AvaloniaProperty.Register(nameof(Color)); public IBrush? Color { get => GetValue(ColorProperty); set => SetValue(ColorProperty, value); } }