feat: add badge font size.

This commit is contained in:
rabbitism
2024-02-26 00:59:52 +08:00
parent 0fae6cc885
commit 5e6db004ee
3 changed files with 23 additions and 15 deletions

View File

@@ -50,6 +50,15 @@ public class Badge: HeaderedContentControl
set => SetValue(OverflowCountProperty, value);
}
public static readonly StyledProperty<double> BadgeFontSizeProperty = AvaloniaProperty.Register<Badge, double>(
nameof(BadgeFontSize));
public double BadgeFontSize
{
get => GetValue(BadgeFontSizeProperty);
set => SetValue(BadgeFontSizeProperty, value);
}
static Badge()
{
HeaderProperty.Changed.AddClassHandler<Badge>((badge, args) => badge.UpdateBadgePosition());