Skip to main content

StandaloneGallery.ContextButtons Property

Provides access to the collection of context buttons displayed in the gallery images.

Namespace: DevExpress.XtraBars.Ribbon.Gallery

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Context Buttons")]
public ContextItemCollection ContextButtons { get; }

Property Value

Type Description
ContextItemCollection

A ContextItemCollection object that represents the collection of context buttons displayed in the gallery images.

Remarks

The ContextButtons property provides access to the collection of context buttons that are displayed in the gallery images. For details, see the ContextItem class, which is the base class for the context buttons.

The figure below shows the GalleryControl control that displays the context buttons in the gallery image.

ContextButtons_StandaloneGallery

At design time, you can manage the context button collection and specify button properties using the Context Buttons designer. To invoke this designer, click the ellipsis button of the ContextButtons property in the Properties window. See the figure below.

ContextButtonsCollectionEditor

To respond to clicks on context buttons in a centralized way, handle the StandaloneGallery.ContextButtonClick event. The Item property of the ContextItemClickEventArgs object passed to the event handler as a parameter, allows you to determine the button being clicked.

The StandaloneGallery.ContextButtonOptions property provides access to the settings applied to the context buttons and the panels that contain them. For instance, you can specify the indent between the buttons, the background color of each panel, animation used to show and hide the panels, and the padding around the buttons.

By default, the StandaloneGallery displays the context buttons with the same properties in all gallery images. If you need to specify custom button properties for individual images or hide specific context buttons, handle the StandaloneGallery.ContextButtonCustomize event.

See Also