Skip to main content
All docs
V18.2

LayoutControlItem.ContextButtons Property

Provides access to the collection of context buttons appearing in this layout item when it is hovered over with the pointer.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v18.2.dll

Declaration

[Browsable(false)]
public ContextItemCollection ContextButtons { get; }

Property Value

Type Description
DevExpress.Utils.ContextItemCollection

The collection of context buttons.

Remarks

The ContextButtons property provides access to the collection of glyph buttons that appear in the current item when it is hovered over with the mouse pointer. You can add simple push buttons into this collection to provide end-users with custom actions (like ‘add to favorites’, ‘share’, etc.) or specific buttons that rate the content or adjust some setting (e. g., brightness). To learn more on the available types of context buttons, see the ContextItem base class.

Typically, context buttons are represented by an icon only, and do not have a caption. You can use the button’s ContextItem.ToolTip property or handle LayoutControlItem.CustomContextButtonToolTip event to provide end-users with information on what a particular button does.

To respond to a click on a push context button, handle the LayoutControlItem.ContextButtonClick event, or subscribe to the required button’s ContextItem.Click event. For context buttons that set up a value, handle the LayoutControlItem.ContextButtonValueChanged event.

The LayoutControlItem.ContextButtonOptions property provides access to the settings applied to the context buttons. For instance, you can specify the indent between the buttons, the animation used to show and hide the buttons, etc.

See Also