[]
A badge is a visual indicator displayed on a C1HamburgerMenu item. Badges can communicate contextual information such as item counts, notifications, statuses, or pending actions.
Badge appearance is configured through the menu Styles property. Each item state provides an independent badge style, allowing badges to change appearance in response to user interaction or item availability.
Badge styles are available through Styles.Items for the following item states.
Item State | Badge Style | |
|---|---|---|
Default |
| |
Disabled |
| |
Hot |
| |
Pressed |
| |
Highlighted |
| |
For example, Styles.Items.Hot.Badge defines the badge appearance while the pointer is positioned over a menu item.
The Badge style exposes the following appearance properties.
Property | Description | |
|---|---|---|
| Specifies the badge shape as | |
| Specifies the font used to render badge text | |
| Specifies the badge text color | |
| Specifies the badge background color | |
| Specifies the badge border color | |
The following example uses rounded rectangle badges for the default and disabled states and a circular badge for the hot state:
c1HamburgerMenu1.Styles.Items.Default.Badge.Shape = BadgeShape.RoundedRectangle;c1HamburgerMenu1.Styles.Items.Hot.Badge.Shape = BadgeShape.Circle;
c1HamburgerMenu1.Styles.Items.Disabled.Badge.Shape = BadgeShape.RoundedRectangle;The following example configures the background, foreground, and border colors for the default badge state.
c1HamburgerMenu1.Styles.Items.Default.Badge.BackColor = Color.Firebrick;c1HamburgerMenu1.Styles.Items.Default.Badge.ForeColor = Color.White;
c1HamburgerMenu1.Styles.Items.Default.Badge.BorderColor = Color.Firebrick;