feat: add Gap property to Avatar.

This commit is contained in:
Zhang Dian
2025-01-14 21:28:41 +08:00
parent dae550ece7
commit e57036163d
4 changed files with 42 additions and 12 deletions

View File

@@ -7,12 +7,21 @@ namespace Ursa.Controls;
public class Avatar : Button
{
public static readonly StyledProperty<double> GapProperty = AvaloniaProperty.Register<Avatar, double>(
nameof(Gap));
public static readonly StyledProperty<IImage?> SourceProperty = AvaloniaProperty.Register<Avatar, IImage?>(
nameof(Source));
public static readonly StyledProperty<object?> HoverMaskProperty = AvaloniaProperty.Register<Avatar, object?>(
nameof(HoverMask));
public double Gap
{
get => GetValue(GapProperty);
set => SetValue(GapProperty, value);
}
[ExcludeFromCodeCoverage]
public IImage? Source
{