BaseListBoxControl.ContextButtons Property

Provides access to the collection of context buttons displayed in the control.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll


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

Property Value

Type Description

A ContextItemCollection object that represents the collection of context buttons.


The ContextButtons property provides access to the collection of context buttons that are displayed by the BaseListBoxControl‘s items. For details on context buttons, see the ContextItem base class.

The figure below shows the ListBoxControl that displays the RatingContextButton.


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


To respond to clicks on context buttons in a centralized way, handle the BaseListBoxControl.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 BaseListBoxControl.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