Skip to main content
A newer version of this page is available. .
Bar

Gallery Class

Represents a gallery of items.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

public class Gallery :
    Control

Remarks

Visually, a gallery consists of groups (GalleryItemGroup), each of which can display any number of gallery items (GalleryItem).

To add groups to a gallery, use the Gallery.Groups collection. Gallery items can be added to a group via the GalleryItemGroup.Items collection.

Example

This example demonstrates how to create a GalleryControl containing two gallery item groups.

The following image shows the result:

GalleryControl_Ex

Class MainWindow 

    Private Sub Gallery_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.Xpf.Bars.GalleryItemEventArgs)
        MessageBox.Show("The " + e.Item.Caption + " item has been clicked")
    End Sub
End Class

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

See Also