All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
Bar

BarItem.Badge Property

Gets or sets the BarItem's BadgeControl. This is a dependency property.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public Badge Badge { get; set; }
Public Property Badge As Badge

Property Value

Type Description
Badge

The badge.

Remarks

If the BarItem.Glyph property is not empty, a BadgeControl is displayed in the glyph area:

WPF BarItem - Badge with Glyph

If the BarItem.Glyph is empty, a BadgeControl is displayed in the content area:

WPF BarItem - Badge without Glyph

Code Sample

The following code sample displays a BarButtonItem with a BadgeControl:

WPF BarItem - Badge property

<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars">
  ...
    <dxb:ToolBarControl>
      <dxb:BarButtonItem Content="Mail" Glyph="{dx:DXImage SvgImages/Outlook Inspired/Glyph_Mail.svg}" GlyphSize="Large">
        <dxb:BarButtonItem.Badge>
          <dx:Badge Content="12"/>
        </dxb:BarButtonItem.Badge>
      </dxb:BarButtonItem>
    </dxb:ToolBarControl>
  ...
</dx:ThemedWindow>
See Also