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 isfalse
.
OverflowCount
The maximum count to be displayed before the count is displayed using the overflow format (e.g. 99+
).
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.
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
- Badge.CornerRadiusProperty
- Badge.DotLengthProperty
- Badge.IsActiveProperty
- Badge.IsAnimationEnabledProperty
- Badge.IsEffectivelyDotProperty
- Badge.KindProperty
- Badge.MeasureOverride(Size)
- Badge.OnApplyTemplate()
- Badge.OnPropertyChanged(DependencyPropertyChangedEventArgs)
- Badge.CornerRadius
- Badge.DotLength
- Badge.IsActive
- Badge.IsAnimationEnabled
- Badge.IsEffectivelyDot
- Badge.Kind