diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
index f8459f5..a561b3b 100644
--- a/demo/Ursa.Demo/Pages/AvatarDemo.axaml
+++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
@@ -64,5 +64,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/Avatar.axaml b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
index 0714791..0f5676c 100644
--- a/src/Ursa.Themes.Semi/Controls/Avatar.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
@@ -21,9 +21,7 @@
RadiusX="{Binding #PART_Ellipse.Bounds.Width, Converter={StaticResource DivideByTwoConverter}}"
RadiusY="{Binding #PART_Ellipse.Bounds.Height, Converter={StaticResource DivideByTwoConverter}}" />
-
+
@@ -131,5 +129,12 @@
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa/Controls/Avatar/AvatarGroup.cs b/src/Ursa/Controls/Avatar/AvatarGroup.cs
index 60e86b7..300a3f6 100644
--- a/src/Ursa/Controls/Avatar/AvatarGroup.cs
+++ b/src/Ursa/Controls/Avatar/AvatarGroup.cs
@@ -1,5 +1,7 @@
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Controls.Templates;
+using Avalonia.Layout;
namespace Ursa.Controls;
@@ -7,11 +9,15 @@ public class AvatarGroup : ItemsControl
{
public const string PART_RenderMore = "PART_RenderMore";
+ private static readonly FuncTemplate DefaultPanel =
+ new(() => new StackPanel { Orientation = Orientation.Horizontal });
+
public static readonly StyledProperty MaxCountProperty = AvaloniaProperty.Register(
nameof(MaxCount));
- public static readonly StyledProperty OverlapFromProperty = AvaloniaProperty.Register(
- nameof(OverlapFrom));
+ public static readonly StyledProperty OverlapFromProperty =
+ AvaloniaProperty.Register(
+ nameof(OverlapFrom));
public int MaxCount
{
@@ -24,6 +30,11 @@ public class AvatarGroup : ItemsControl
get => GetValue(OverlapFromProperty);
set => SetValue(OverlapFromProperty, value);
}
+
+ static AvatarGroup()
+ {
+ ItemsPanelProperty.OverrideDefaultValue(DefaultPanel);
+ }
}
public enum OverlapFromType