This commit is contained in:
TheXamlGuy
2024-07-17 21:43:58 +01:00
parent efd00ff81a
commit 93c7a43ab4
75 changed files with 231 additions and 183 deletions
@@ -5,7 +5,8 @@ using Avalonia.Media;
using Path = Avalonia.Controls.Shapes.Path;
namespace Toolkit.UI.Controls.Avalonia;
public class ContentBadge :
public class ContentBadge :
ContentControl
{
public static readonly StyledProperty<string> BadgePathProperty =
@@ -95,14 +96,17 @@ public class ContentBadge :
offsetX = 0;
offsetY = 0;
break;
case ContentBadgePlacement.TopRight:
offsetX = backgroundWidth - scaledWidth;
offsetY = 0;
break;
case ContentBadgePlacement.BottomLeft:
offsetX = 0;
offsetY = backgroundHeight - scaledHeight;
break;
case ContentBadgePlacement.BottomRight:
offsetX = backgroundWidth - scaledWidth;
offsetY = backgroundHeight - scaledHeight;
@@ -154,5 +158,4 @@ public class ContentBadge :
base.OnSizeChanged(args);
UpdateBadge();
}
}
}
@@ -6,5 +6,4 @@ public enum ContentBadgePlacement
TopRight,
BottomLeft,
BottomRight
}
}