The badge control, as a specific state content badge of other controls, can minimize the invasion of the original control. It can be regarded as a content control. The internal Content is the modified control corresponding to the badge that needs to be displayed. The inheritance relationship is as follows:
1
publicclassBadge : ContentControl
Basic attributes
Property Name
Use
Text
Gets or sets the badge display content
Value
Get or set display value, support dynamic change of value
Status
Gets or sets the type of tag status, Text (Dot), Processing (Dynamic Tag) defaults to text display
Maximum
Gets or sets the maximum display value. When the value is displayed, the maximum value is displayed
BadgeMargin
Gets or sets the margin of the badge relative to the decorated control
ShowBadge
Gets or sets whether to display the flag, the default is True
In xaml, remember to introduce the handycontrol namespace
You may be confused when you see the property explanation. Text and Value have the same effect and value. What is the difference? In the markup control, the text and numeric types are distinguished. The numeric types can be dynamically changed and the data statistics displayed. When both are present at the same time, Text is displayed by default.
BadgeMargin is used to set the margin relative to the decorated control. Generally, this property is not modified. It is recommended to use 0, -14, -20,0