BarCheckItem Class
Represents a check button in bars.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public class BarCheckItem :
BarButtonItem,
IBarCheckItem
#Remarks
By default, this button has two states: checked (pressed) and unchecked (not pressed).
Clicking a check button automatically toggles its state and fires the BarCheckItem.CheckedChanged event. In code, you can change the button’s check state via the BarCheckItem.IsChecked property.
If the BarCheckItem.IsThreeState option is enabled, a check button supports three states. Use the BarCheckItem.IsChecked property to get/set the check state.
Bar check items can be combined into a group via the BarCheckItem.GroupIndex property. Checking one item within a group automatically unchecks the other items.
#Example
This example shows how to create bar items and associate them with a custom Format category.
The following image shows the result:
Imports System
Imports System.Collections.Generic
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Windows
Namespace WpfApplication3
''' <summary>
''' Interaction logic for App.xaml
''' </summary>
Partial Public Class App
Inherits Application
Private Sub OnAppStartup_UpdateThemeName(ByVal sender As Object, ByVal e As StartupEventArgs)
DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName()
End Sub
End Class
End Namespace
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BarCheckItem class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.