In This Article

BadgeService Class

A service for managing badges.

public class BadgeService
Inheritance:
object object

Methods

GetBadge(AvaloniaObject)

Gets the Badge attached as an adornment to the visual.

public static Badge? GetBadge(AvaloniaObject obj)
Parameter Type Description
obj AvaloniaObject

The visual.

Returns

Badge

GetHorizontalAlignment(AvaloniaObject)

Gets the horizontal alignment of the Badge relative to the adorned visual.

public static AdornmentHorizontalAlignment GetHorizontalAlignment(AvaloniaObject obj)
Parameter Type Description
obj AvaloniaObject

The visual.

Returns

AdornmentHorizontalAlignment

GetHorizontalOffset(AvaloniaObject)

Gets the horizontal offset of the Badge.

public static double GetHorizontalOffset(AvaloniaObject obj)
Parameter Type Description
obj AvaloniaObject

The visual.

Returns

double

GetVerticalAlignment(AvaloniaObject)

Gets the vertical alignment of the Badge relative to the adorned visual.

public static AdornmentVerticalAlignment GetVerticalAlignment(AvaloniaObject obj)
Parameter Type Description
obj AvaloniaObject

The visual.

Returns

AdornmentVerticalAlignment

GetVerticalOffset(AvaloniaObject)

Gets the vertical offset of the Badge.

public static double GetVerticalOffset(AvaloniaObject obj)
Parameter Type Description
obj AvaloniaObject

The visual.

Returns

double

SetBadge(AvaloniaObject, Badge?)

Sets the Badge attached as an adornment to the visual.

public static void SetBadge(AvaloniaObject obj, Badge? value)
Parameter Type Description
obj AvaloniaObject

The visual.

value Badge

The Badge to be assigned.

SetHorizontalAlignment(AvaloniaObject, AdornmentHorizontalAlignment)

Sets the horizontal alignment of the Badge relative to the adorned visual.

public static void SetHorizontalAlignment(AvaloniaObject obj, AdornmentHorizontalAlignment value)
Parameter Type Description
obj AvaloniaObject

The visual.

value AdornmentHorizontalAlignment

The alignment to be assigned.

Remarks

The default value is CenterOnTargetRightEdge.

SetHorizontalOffset(AvaloniaObject, double)

Sets the horizontal offset of the Badge.

public static void SetHorizontalOffset(AvaloniaObject obj, double value)
Parameter Type Description
obj AvaloniaObject

The visual.

value double

The value to be assigned.

SetVerticalAlignment(AvaloniaObject, AdornmentVerticalAlignment)

Sets the vertical alignment of the Badge relative to the adorned visual.

public static void SetVerticalAlignment(AvaloniaObject obj, AdornmentVerticalAlignment value)
Parameter Type Description
obj AvaloniaObject

The visual.

value AdornmentVerticalAlignment

The alignment to be assigned.

Remarks

The default value is CenterOnTargetTopEdge.

SetVerticalOffset(AvaloniaObject, double)

Sets the vertical offset of the Badge.

public static void SetVerticalOffset(AvaloniaObject obj, double value)
Parameter Type Description
obj AvaloniaObject

The visual.

value double

The value to be assigned.

Fields

BadgeProperty

Defines the Badge attached property.

public static readonly AttachedProperty<Badge?> BadgeProperty

HorizontalAlignmentProperty

Defines the HorizontalAlignment attached property.

public static readonly AttachedProperty<AdornmentHorizontalAlignment> HorizontalAlignmentProperty

HorizontalOffsetProperty

Defines the HorizontalOffset attached property.

public static readonly AttachedProperty<double> HorizontalOffsetProperty

VerticalAlignmentProperty

Defines the VerticalAlignment attached property.

public static readonly AttachedProperty<AdornmentVerticalAlignment> VerticalAlignmentProperty

VerticalOffsetProperty

Defines the VerticalOffset attached property.

public static readonly AttachedProperty<double> VerticalOffsetProperty

Inherited Members

Extension Methods