wpf-devexpress-dot-xpf-dot-bars-dot-barcheckitem-4ea98ce4.md
Gets or sets whether the item is in the pushed state. This is a dependency property.
Namespace : DevExpress.Xpf.Bars
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public bool? IsChecked { get; set; }
Public Property IsChecked As Boolean?
| Type | Description |
|---|---|
| Nullable<Boolean> |
true if the item is in the pushed state; otherwise, false.
|
Use the IsChecked property to specify the item’s check state. By default, a bar check item has two states - Checked and Unchecked. If the BarCheckItem.IsThreeState option is enabled, the item supports three states: Checked, Unchecked and Indeterminate.
Changing the IsChecked property fires the BarCheckItem.CheckedChanged event.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsChecked property.
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.
mvvm-application-with-wpf-bars/CS/Bars_in_MVVM_Application/MainWindow.xaml#L44
<dxb:BarCheckItem x:Name="completed" Content="Completed"
IsChecked="{Binding SelectedIssue.Completed}"
IsEnabled="{DXBinding 'SelectedIssue != null'}"
<dxb:BarSubItem Name="bsFile" Content="File"/>
<dxb:BarCheckItem Name="bMDIStyle" CategoryName="Window" Content="Use Tabbed MDI" IsThreeState="False" IsChecked="False"
Command="dxdo:MDIControllerCommand.ChangeMDIStyle"
wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L32
<dxr:RibbonStatusBarControl.RightItems>
<dxb:BarCheckItem x:Name="biLeft" Glyph="{dx:DXImage Image=AlignLeft_16x16.png}" GroupIndex="1" IsChecked="True" MergeType="MergeItems"/>
<dxb:BarCheckItem x:Name="biCenter" Glyph="{dx:DXImage Image=AlignCenter_16x16.png}" GroupIndex="1" MergeType="MergeItems"/>
wpf-pivot-grid-create-context-menu-for-field-values/CS/WpfPivotGrid_CustomMenu/MainWindow.xaml#L20
<dxb:BarCheckItem Name="ShowColumnGrandTotals"
IsChecked="{Binding ElementName=pivotGrid, Path=ShowColumnGrandTotals, Mode=TwoWay}"
Content="Show Column Grand Totals" />
wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml.cs#L16
private void customAllowAppointmentCreateHandler(object sender, AppointmentItemOperationEventArgs e) {
if((bool)barItemDisableCreatingAppointments.IsChecked) {
// If the "Disable Creating Appointments" bar item is checked, do not allow appointment creation
if (IsTopFiveValuesApplied(valueItem))
item.IsChecked = true;
item.CheckedChanged += Item_CheckedChanged;
wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml.cs#L13
AppointmentItem selectedItem = scheduler.SelectedAppointments[0];
selectedItem.AllDay = (allDayCheck.IsChecked == true) ? true : false;
}
wpf-pivot-grid-change-summary-display-type/CS/HeaderMenuCustomizationExample/HeaderMenuHelper.cs#L81
checkItem.Content = enumValue.ToString();
checkItem.IsChecked = Object.Equals(field.Tag, enumValue)||
enumValue.Equals(FieldSummaryDisplayType.Default) && field.Tag == null;
If IsTopFiveValuesApplied(valueItem) Then
item.IsChecked = True
End If
wpf-pivot-grid-change-summary-display-type/VB/HeaderMenuCustomizationExample/HeaderMenuHelper.vb#L80
checkItem.Content = enumValue.ToString()
checkItem.IsChecked = Object.Equals(field.Tag, enumValue) OrElse enumValue.Equals(FieldSummaryDisplayType.Default) AndAlso field.Tag Is Nothing
checkItem.Tag = New Object() {field, [property], enumValue}
See Also