Refactor Avatar Icon

This commit is contained in:
chinboy
2025-11-25 13:32:48 +08:00
parent 1c37f5ee1e
commit 70b976e71c
+3 -3
View File
@@ -43,8 +43,8 @@ public class Avatar : TemplatedControl, IControlSharedTokenResourcesHost, IMotio
public static readonly StyledProperty<double> GapProperty =
AvaloniaProperty.Register<Avatar, double>(nameof(Gap), defaultValue: 4.0);
public static readonly StyledProperty<Icon?> IconProperty =
AvaloniaProperty.Register<Avatar, Icon?>(nameof(Icon));
public static readonly StyledProperty<PathIcon?> IconProperty =
AvaloniaProperty.Register<Avatar, PathIcon?>(nameof(Icon));
public static readonly StyledProperty<IImage?> BitmapSrcProperty =
AvaloniaProperty.Register<Avatar, IImage?>(nameof(BitmapSrc));
@@ -74,7 +74,7 @@ public class Avatar : TemplatedControl, IControlSharedTokenResourcesHost, IMotio
set => SetValue(GapProperty, value);
}
public Icon? Icon
public PathIcon? Icon
{
get => GetValue(IconProperty);
set => SetValue(IconProperty, value);