Back to Devexpress

BarCheckItem.CheckedChanged Event

wpf-devexpress-dot-xpf-dot-bars-dot-barcheckitem.md

latest10.0 KB
Original Source

BarCheckItem.CheckedChanged Event

Fires when the item’s BarCheckItem.IsChecked property is changed.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public event ItemClickEventHandler CheckedChanged
vb
Public Event CheckedChanged As ItemClickEventHandler

Event Data

The CheckedChanged event's data class is ItemClickEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
ItemGets the bar item that is currently being processed.
LinkGets the bar item link that is currently being processed.
LinkControlGets the bar item link control that is currently being processed.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

Handle this event to respond to changing the BarCheckItem.IsChecked property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckedChanged event.

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.

wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml#L50

xml
<dxr:RibbonPageGroup Caption="Restrictions">
    <dxb:BarCheckItem x:Name="barCheckItem1" Content="Disable Creating Appointments" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" CheckedChanged="BarButtonItem_ItemClick"/>
    <dxb:BarCheckItem x:Name="barCheckItem2" Content="Disable Appointment Conflicts" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" CheckedChanged="barCheckItem2_CheckedChanged"/>

how-to-customize-a-grids-context-menu-e1925/CS/Window1.xaml#L12

xml
<dxg:TableView.ColumnMenuCustomizations>
    <dxb:BarCheckItem Content="BarCheckItem" dxb:BarItemLinkActionBase.ItemLinkIndex="0" CheckedChanged="BarCheckItem_CheckedChanged"/>
    <dxb:BarItemLinkSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="1"/>

wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml#L98

xml
Glyph="{dx:DXImage Image=Check_16x16.png}"
                      CheckedChanged="allDayCheck_CheckedChanged"/>
</dxb:InsertAction>

how-to-customize-a-grids-context-menu-e1925/CS/obj/Debug/net8.0-windows/Window1.g.cs#L93

csharp
#line 12 "..\..\..\Window1.xaml"
((DevExpress.Xpf.Bars.BarCheckItem)(target)).CheckedChanged += new DevExpress.Xpf.Bars.ItemClickEventHandler(this.BarCheckItem_CheckedChanged);

wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/obj/Debug/net8.0-windows/MainWindow.g.cs#L135

csharp
#line 98 "..\..\..\MainWindow.xaml"
this.allDayCheck.CheckedChanged += new DevExpress.Xpf.Bars.ItemClickEventHandler(this.allDayCheck_CheckedChanged);

wpf-pivot-grid-show-top-n-values-in-context-menu/CS/ContextMenuToShowTopN_Example/MainWindow.xaml.cs#L58

csharp
item.IsChecked = true;
item.CheckedChanged += Item_CheckedChanged;

wpf-scheduler-apply-end-user-restrictions/VB/WpfApplication1/obj.NetFX/x86/Debug/MainWindow.g.vb#L141

vb
#ExternalSource("..\..\..\MainWindow.xaml",50)
AddHandler Me.barCheckItem1.CheckedChanged, New DevExpress.Xpf.Bars.ItemClickEventHandler(AddressOf Me.BarButtonItem_ItemClick)

how-to-customize-a-grids-context-menu-e1925/VB/obj.NetFX/Debug/Window1.g.vb#L93

vb
#ExternalSource("..\..\Window1.xaml",12)
AddHandler CType(target,DevExpress.Xpf.Bars.BarCheckItem).CheckedChanged, New DevExpress.Xpf.Bars.ItemClickEventHandler(AddressOf Me.BarCheckItem_CheckedChanged)

wpf-scheduler-customize-context-menus/VB/DXScheduler_PopUpMenuCustomization/obj.NetFX/Debug/MainWindow.g.vb#L134

vb
#ExternalSource("..\..\MainWindow.xaml",98)
AddHandler Me.allDayCheck.CheckedChanged, New DevExpress.Xpf.Bars.ItemClickEventHandler(AddressOf Me.allDayCheck_CheckedChanged)

wpf-pivot-grid-show-top-n-values-in-context-menu/VB/ContextMenuToShowTopN_Example/MainWindow.xaml.vb#L56

vb
End If
AddHandler item.CheckedChanged, AddressOf Item_CheckedChanged

See Also

ItemCheckMode

ItemClick

Command

KeyGesture

BarCheckItem Class

BarCheckItem Members

DevExpress.Xpf.Bars Namespace