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 object.
public static Badge? GetBadge(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
Returns
GetHorizontalAlignment(DependencyObject)
Gets the horizontal alignment of the Badge relative to the adorned object.
public static AdornmentHorizontalAlignment GetHorizontalAlignment(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
Returns
GetHorizontalOffset(DependencyObject)
Gets the horizontal offset of the Badge.
public static double GetHorizontalOffset(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
Returns
GetVerticalAlignment(DependencyObject)
Gets the vertical alignment of the Badge relative to the adorned object.
public static AdornmentVerticalAlignment GetVerticalAlignment(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
Returns
GetVerticalOffset(DependencyObject)
Gets the vertical offset of the Badge.
public static double GetVerticalOffset(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
Returns
SetBadge(DependencyObject, Badge?)
Sets the Badge attached as an adornment to the object.
public static void SetBadge(DependencyObject obj, Badge? value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
| value | Badge | The Badge to be assigned. |
SetHorizontalAlignment(DependencyObject, AdornmentHorizontalAlignment)
Sets the horizontal alignment of the Badge relative to the adorned object.
public static void SetHorizontalAlignment(DependencyObject obj, AdornmentHorizontalAlignment value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
| 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 object. |
| value | double | The value to be assigned. |
SetVerticalAlignment(DependencyObject, AdornmentVerticalAlignment)
Sets the vertical alignment of the Badge relative to the adorned object.
public static void SetVerticalAlignment(DependencyObject obj, AdornmentVerticalAlignment value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object. |
| 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 object. |
| value | double | The value to be assigned. |
Fields
BadgeProperty
Defines the Badge property.
public static readonly DependencyProperty BadgeProperty
HorizontalAlignmentProperty
Defines the HorizontalAlignment property.
public static readonly DependencyProperty HorizontalAlignmentProperty
HorizontalOffsetProperty
Defines the HorizontalOffset property.
public static readonly DependencyProperty HorizontalOffsetProperty
VerticalAlignmentProperty
Defines the VerticalAlignment property.
public static readonly DependencyProperty VerticalAlignmentProperty
VerticalOffsetProperty
Defines the VerticalOffset property.
public static readonly DependencyProperty VerticalOffsetProperty
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()