Back to Devexpress

Gallery.ItemClick Event

wpf-devexpress-dot-xpf-dot-bars-dot-gallery-9436e00b.md

latest3.3 KB
Original Source

Gallery.ItemClick Event

Fires when a gallery item is clicked.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public event GalleryItemEventHandler ItemClick
vb
Public Event ItemClick As GalleryItemEventHandler

Event Data

The ItemClick event's data class is DevExpress.Xpf.Bars.GalleryItemEventArgs.

Remarks

The ItemClick event fires when clicking any item within the gallery. To respond to clicking a particular item, you can handle the GalleryItem.Click event.

If you need to get the item’s check state while handling the ItemClick event, use the GalleryItem.IsChecked property. Item checking/unchecking can be enabled via the Gallery.ItemCheckMode property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemClick 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.

create-wpf-gallery-control/CS/GalleryControl_Ex/MainWindow.xaml#L21

xml
IsItemDescriptionVisible="True"
ItemClick="Gallery_ItemClick"
FilterCaption="(click to filter groups)"

create-wpf-gallery-control/CS/GalleryControl_Ex/obj/Debug/net8.0-windows/MainWindow.g.cs#L94

csharp
#line 21 "..\..\..\MainWindow.xaml"
((DevExpress.Xpf.Bars.Gallery)(target)).ItemClick += new DevExpress.Xpf.Bars.GalleryItemEventHandler(this.Gallery_ItemClick);

create-wpf-gallery-control/VB/GalleryControl_Ex/obj.NetFX/x86/Debug/MainWindow.g.vb#L92

vb
#ExternalSource("..\..\..\MainWindow.xaml",21)
AddHandler CType(target,DevExpress.Xpf.Bars.Gallery).ItemClick, New DevExpress.Xpf.Bars.GalleryItemEventHandler(AddressOf Me.Gallery_ItemClick)

See Also

Click

IsChecked

Gallery Class

Gallery Members

DevExpress.Xpf.Bars Namespace