In This Article

BadgeService Class

A service for managing badges.

public class BadgeService
Inheritance:
object object

Methods

GetBadge(DependencyObject)

Gets the Badge attached as an adornment to the element.

public static Badge GetBadge(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The element.

Returns

Badge

GetHorizontalAlignment(DependencyObject)

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

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

The element.

Returns

AdornmentHorizontalAlignment

GetHorizontalOffset(DependencyObject)

Gets the horizontal offset of the Badge.

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

The element.

Returns

double

GetVerticalAlignment(DependencyObject)

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

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

The element.

Returns

AdornmentVerticalAlignment

GetVerticalOffset(DependencyObject)

Gets the vertical offset of the Badge.

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

The element.

Returns

double

SetBadge(DependencyObject, Badge)

Sets the Badge attached as an adornment to the element.

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

The element.

value Badge

The Badge to be assigned.

SetHorizontalAlignment(DependencyObject, AdornmentHorizontalAlignment)

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

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

The element.

value AdornmentHorizontalAlignment

The alignment to be assigned.

Remarks

The default value is CenterOnTargetRightEdge.

SetHorizontalOffset(DependencyObject, double)

Sets the horizontal offset of the Badge.

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

The element.

value double

The value to be assigned.

SetVerticalAlignment(DependencyObject, AdornmentVerticalAlignment)

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

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

The element.

value AdornmentVerticalAlignment

The alignment to be assigned.

Remarks

The default value is CenterOnTargetTopEdge.

SetVerticalOffset(DependencyObject, double)

Sets the vertical offset of the Badge.

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

The element.

value double

The value to be assigned.

Fields

BadgeProperty

Identifies the Badge dependency property.

public static readonly DependencyProperty BadgeProperty

HorizontalAlignmentProperty

Identifies the HorizontalAlignment dependency property.

public static readonly DependencyProperty HorizontalAlignmentProperty

HorizontalOffsetProperty

Identifies the HorizontalOffset dependency property.

public static readonly DependencyProperty HorizontalOffsetProperty

VerticalAlignmentProperty

Identifies the VerticalAlignment dependency property.

public static readonly DependencyProperty VerticalAlignmentProperty

VerticalOffsetProperty

Identifies the VerticalOffset dependency property.

public static readonly DependencyProperty VerticalOffsetProperty

Inherited Members