Codemaid
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user