[]
        
(Showing Draft Content)

Badges

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 States

Badge styles are available through Styles.Items for the following item states.

Item State

Badge Style

Default

Styles.Items.Default.Badge

Disabled

Styles.Items.Disabled.Badge

Hot

Styles.Items.Hot.Badge

Pressed

Styles.Items.Pressed.Badge

Highlighted

Styles.Items.Highlighted.Badge

For example, Styles.Items.Hot.Badge defines the badge appearance while the pointer is positioned over a menu item.


Badge Style Properties

The Badge style exposes the following appearance properties.

Property

Description

Shape

Specifies the badge shape as Circle or RoundedRectangle

Font

Specifies the font used to render badge text

ForeColor

Specifies the badge text color

BackColor

Specifies the badge background color

BorderColor

Specifies the badge border color

Example

Configure Badge Shapes

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;

Configure Badge Colors

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;