[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Collapse]Ribbon, Bars and Menu
   [Expand]Bars
   [Expand]Ribbon
   [Expand]Popup Menus
    Radial Menu
   [Collapse]Common Features
    [Expand]Appearance and Look and Feel
    [Collapse]Galleries
      Gallery Controls
      Gallery Items
      Customizing Galleries at Design Time
      How to: Customize a GalleryControl at Runtime
     Stub Glyphs
     The List of Bar Items and Links
   [Expand]Examples
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Gallery Controls

Several DevExpress controls can display image galleries. Some of these controls are designed to display solely image galleries, while in other controls, image galleries are only a part of the control functionality. This topic lists the available gallery controls, describes the structure of galleries and covers common gallery features.

On this page:

Expanded Online Video

Expanded RibbonControl

The Ribbon Control implements the Ribbon UI introduced in MS Office products. Beside editors, menus, regular and check buttons, the Ribbon Control can display inline and dropdown image galleries.

Galleries in the Ribbon Control can be created using the RibbonGalleryBarItem object. See In-Ribbon Galleries to learn more.

Expanded GalleryControl

GalleryControl is a standalone image gallery control.

The gallery in this control can be accessed and customized using the GalleryControl.Gallery property, which is of the GalleryControlGallery type. See the GalleryControl class description for information on features that are specific to this control. General gallery features are covered below.

Expanded PopupGalleryEdit

PopupGalleryEdit is an editor that supports a dropdown image gallery. This control can be used as an in-place editor within cells in container controls and components (e.g., GridControl, TreeList, BarManager, etc.).

The editor's value and display text are formed from the selected gallery item(s).

The gallery in this control is referred to by the RepositoryItemPopupGalleryEdit.Gallery property, which is of the PopupGalleryEditGallery type.

Expanded GalleryDropDown

GalleryDropDown is a popup gallery control, which can be displayed as a context menu. This control is also used to implement dropdown galleries in the Ribbon Control.

The GalleryDropDown allows custom menu items (bar items) to be displayed below the embedded gallery. In the image above, the Font Size and Font Color are custom menu items.

The gallery in this control is accessed using the GalleryDropDown.Gallery property, which is of the InDropDownGallery type.

Expanded Gallery Elements

All galleries in the DevExpress controls are derived from one ancestor - the BaseGallery class, and they have some common features. To learn about additional features provided by specific gallery controls, see the descriptions of these controls.

Structurally and visually, each gallery consists of gallery items (GalleryItem) combined into gallery item groups (GalleryItemGroup).

Gallery items display images and text, while gallery item groups are tailored to separate sets of items. In some controls, gallery item group captions (GalleryItemGroup.Caption) are hidden by default. To toggle group caption visibility, use the BaseGallery.ShowGroupCaption property. To show text for gallery items, use BaseGallery.ShowItemText. See Gallery Items to learn about basic item features.

Gallery controls allow you to create their elements at design time. See the following topic to learn more.

To create gallery items at runtime, first add a gallery item group (GalleryItemGroup) to the BaseGallery.Groups collection. Then, add gallery items (GalleryItem) to this group using the GalleryItemGroup.Items collection. This approach is demonstrated in the following example.

Note

All images assigned to gallery items are loaded into memory simultaneously. So, if the volume of loaded images is too large, you may experience out-of-memory issues. If you have large images, resize them to a smaller size before assigning them to gallery items.

Expanded Common Gallery Features

The following table shows common gallery features and corresponding members, grouped by functionality.

Gallery Item View Features

Member(s)

Ability to control item image display size

BaseGallery.ImageSize, BaseGallery.FixedImageSize, BaseGallery.UseMaxImageSize

Ability to display captions and descriptions.

BaseGallery.ShowItemText

Customizable positions of items' text relative to their images

BaseGallery.ItemImageLocation

Stretching, zooming or clipping item images

BaseGallery.ItemImageLayout

Tooltips

GalleryItem.Hint, GalleryItem.SuperTip

Hover images

BaseGallery.AllowHoverImages

Layout

Customizing item layout options.

Some options are only applicable in the GalleryControl.

BaseGallery.ColumnCount, BaseGallery.FirstItemVertAlignment, BaseGallery.LastItemVertAlignment, BaseGallery.DistanceBetweenItems,

BaseGallery.DistanceItemCaptionToDescription, BaseGallery.DistanceItemImageToText

GalleryControlGallery.AutoFitColumns, GalleryControlGallery.ContentHorzAlignment

Changing the orientation from vertical to horizontal.

Supported only by the GalleryControl.

GalleryControlGallery.Orientation

Custom commands shown below the gallery.

Supported only by the GalleryDropDown.

PopupMenuBase.ItemLinks

Gallery Item Group Features

Ability to display group captions

BaseGallery.ShowGroupCaption, GalleryItemGroup.Caption

Custom controls within group captions

Supported only by the GalleryControl.

GalleryItemGroup.CaptionControl

Filtering groups using a context menu.

Not supported by In-Ribbon Galleries.

StandaloneGallery.AllowFilter

Customizing the group filter context menu.

Not supported by In-Ribbon Galleries.

BaseGallery.FilterMenuPopup

Behavior

Multiple item checking/selection modes

BaseGallery.ItemCheckMode, BaseGallery.AllowMarqueeSelection, BaseGallery.GetCheckedItems, BaseGallery.ClearSelectionOnClickEmptySpace,

BaseGallery.CheckDrawMode

Standard and smooth scrolling

BaseGallery.ScrollMode and StandaloneGallery.UseOptimizedScrolling

Responding to item clicking, checking and double-clicking

BaseGallery.ItemClick, BaseGallery.ItemCheckedChanged and BaseGallery.ItemDoubleClick

Appearance

Ability to specify a background image and appearance settings for the control

BaseGallery.Appearance and GalleryControlGallery.BackgroundImage

Custom drawing of gallery item images

BaseGallery.CustomDrawItemImage

Custom drawing of gallery item captions

BaseGallery.CustomDrawItemText

Expanded See Also

Is this topic helpful?​​​​​​​