Skip to main content

RepositoryItemPopupGalleryEdit.Gallery Property

Gets the gallery used in the PopupGalleryEdit control.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraBars.v23.1.dll

NuGet Package: DevExpress.Win.Navigation


public PopupGalleryEditGallery Gallery { get; }

Property Value

Type Description

The gallery used in the PopupGalleryEdit control.


The Gallery property contains the PopupGalleryEditGallery object that is displayed in the PopupGalleryEdit popup window. The PopupGalleryEditGallery contains gallery items (GalleryItem) combined into gallery item groups (GalleryItemGroup). Via this property, you can get the PopupGalleryEditGallery object to specify its settings and manipulate gallery groups and items.

To customize PopupGalleryEditGallery at design time, you can use the Gallery Designer. To open the Gallery Designer, click the PopupGalleryEdit‘s smart tag Common_SmartTag and click the Edit Gallery link.



The following example shows how to customize the Popup Gallery Edit in code, using properties of the PopupGalleryEditGallery object that is accessed via the RepositoryItemPopupGalleryEdit.Gallery property.

In this example, multiple item selection is enabled and the gallery is set to display item captions and descriptions. Newly created gallery items are combined into the group and this group is added into the collection of gallery item groups.

using DevExpress.XtraBars.Ribbon.Gallery;
using DevExpress.XtraEditors;

// Specify item selection mode. 
popupGalleryEdit1.Properties.Gallery.ItemCheckMode = ItemCheckMode.Multiple;

// Enable item captions and descriptions showing. 
popupGalleryEdit1.Properties.Gallery.ShowItemText = true;

// Create gallery items and add them to the newly created gallery item group. 
GalleryItem gi1 = new GalleryItem();
gi1.Caption = "Item1";
gi1.Description = "Item1 description";
GalleryItem gi2 = new GalleryItem();
gi2.Caption = "Item2";
gi2.Description = "Item2 description";
GalleryItemGroup gig = new GalleryItemGroup();
gig.Caption = "Gallery group";
// Add this group to the group collection of the gallery 
// that is displayed in the PopupGalleryEdit popup window. 
See Also