In This Article

NumericBadge Class

A Badge that displays a numerical counter.

public class NumericBadge : Badge
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl Badge object

Constructors

NumericBadge()

Initializes an instance of the class.

public NumericBadge()

Properties

Count

The current count to be displayed.

public int Count { get; set; }

Property Value

int:

A negative value indicates the badge is not active, and a positive value indicates the badge is active. A value of zero is active only when IsActiveWhenZero is true.

IsActiveWhenZero

Indicates if the badge is active when the current count is zero.

public bool IsActiveWhenZero { get; set; }

Property Value

bool:

true for the badge to be active when the count is zero; otherwise, false for the badge to be inactive when the count is zero. The default value is false.

OverflowCount

The maximum count to be displayed before the count is displayed using the overflow format (e.g. 99+).

public int OverflowCount { get; set; }

Property Value

int:

The default value is 99.

See Also

OverflowStringFormat

The format of the string used to display the count when overflowed.

public string OverflowStringFormat { get; set; }

Property Value

string:

The default value is {0}+.

Remarks

This value is passed to string.Format where arg0 is the overflow count.

See Also

Methods

CoerceAllProperties()

Requests all coerced properties to be coerced.

protected override void CoerceAllProperties()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

CountProperty

Defines the Count property.

public static readonly DependencyProperty CountProperty

IsActiveWhenZeroProperty

Defines the IsActiveWhenZero property.

public static readonly DependencyProperty IsActiveWhenZeroProperty

OverflowCountProperty

Defines the OverflowCount property.

public static readonly DependencyProperty OverflowCountProperty

OverflowStringFormatProperty

Defines the OverflowStringFormat property.

public static readonly DependencyProperty OverflowStringFormatProperty

Inherited Members