Back to Devexpress

BarCheckItem.Checked Property

windowsforms-devexpress-dot-xtrabars-dot-barcheckitem-ddd7744e.md

latest7.2 KB
Original Source

BarCheckItem.Checked Property

Gets or sets a value indicating whether the item is in the pushed state.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Bindable(false)]
[DefaultValue(false)]
public virtual bool Checked { get; set; }
vb
<DefaultValue(False)>
<Bindable(False)>
Public Overridable Property Checked As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the item is currently in the pushed state; otherwise, false.

|

Remarks

Use the Checked property to specify the check state of a bar item (checked or unchecked). When this property’s value is true , the check item appears sunken.

Changing the Checked property value raises the BarCheckItem.CheckedChanged event.

Important

To bind the item’s checked state to a specific source via the BarItem.DataBindings collection, use the BarCheckItem.BindableChecked property rather than the Checked property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Checked 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.

winforms-spreadsheet-implement-microsoft-excel-format-painter/CS/WindowsFormsApplication1/FormatPainterProvider.cs#L35

csharp
if (sourceCell != null && e.SheetName == sourceCell.Worksheet.Name)
        biFormatPainter.Checked = false;
}

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/CS/MultiPaneExtension/MultiPaneModule.cs#L156

csharp
{
    enableBarItem.Checked = showTitlesBarItem.Checked = allowCollapsingBarItem.Checked = false;
    enableBarItem.Enabled = showTitlesBarItem.Enabled =

how-to-export-cell-range-to-a-datatable/CS/ExportToDataTableExample/Form1.cs#L23

csharp
{
    if (barCheckItemStopEmptyRow.Checked) {
        ExportSelectionStopOnEmptyRow();

xaf-win-custom-action-with-custom-action-control/CS/EFCore/CustomActionEF/CustomActionEF.Win/ActionControls/BarCheckItemCheckableSimpleActionControl.cs#L22

csharp
public bool Checked {
    get { return BarItem.Checked; }
    set { BarItem.Checked = value; }

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/Heatmap/HeatmapItemExtensionModule.cs#L108

csharp
if(SelectedCustomItem != null) {
    barShowLabelsItem.Checked = SelectedCustomItem.Metadata.ShowLabels;
    barShowLegendItem.Checked = SelectedCustomItem.Metadata.ShowLegend;

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/VB/MultiPaneExtension/MultiPaneModule.vb#L131

vb
If chartItem.Panes.Count>1 Then
    allowCollapsingBarItem.Checked = False
    showTitlesBarItem.Checked = allowCollapsingBarItem.Checked

winforms-spreadsheet-implement-microsoft-excel-format-painter/VB/WindowsFormsApplication1/FormatPainterProvider.vb#L38

vb
Private Sub Spreadsheet_SheetRemoving(ByVal sender As Object, ByVal e As SheetRemovingEventArgs)
    If sourceCell IsNot Nothing AndAlso Equals(e.SheetName, sourceCell.Worksheet.Name) Then biFormatPainter.Checked = False
End Sub

how-to-export-cell-range-to-a-datatable/VB/ExportToDataTableExample/Form1.vb#L23

vb
Private Sub barButtonItemRangeToDataTable_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs)
    If barCheckItemStopEmptyRow.Checked Then
        ExportSelectionStopOnEmptyRow()

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/Heatmap/HeatmapItemExtensionModule.vb#L123

vb
If SelectedCustomItem IsNot Nothing Then
    barShowLabelsItem.Checked = SelectedCustomItem.Metadata.ShowLabels
    barShowLegendItem.Checked = SelectedCustomItem.Metadata.ShowLegend

winforms-rich-edit-implement-ms-office-word-format-painter/VB/DXApplication9/Form1.vb#L47

vb
Private Sub richEditControl_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles richEditControl.MouseUp
    If barCheckItem1.Checked Then
        ApplyFormatToSelectedText()

See Also

Checked

CheckedChanged

BarCheckItem Class

BarCheckItem Members

DevExpress.XtraBars Namespace