Skip to main content

DropDownButton.DropDownControl Property

Gets or sets the popup control for the button.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(null)]
[DXCategory("Behavior")]
public virtual IDXDropDownControl DropDownControl { get; set; }

Property Value

Type Default Description
IDXDropDownControl null

A popup control object.

Remarks

You can use the following objects for a popup control:

Note

For the PopupMenu and PopupControlContainer objects to work correctly, ensure that they are associated with a BarManager or RibbonControl component. Use their Manager or Ribbon property to bind the objects to one of these components.

Before a popup control is displayed, the DropDownButton.ShowDropDownControl event is raised. Handle this event to dynamically customize the popup control, block it in specific cases, or supply a custom popup control dynamically.

The DropDownButton.ArrowButtonClick event allows you to display a custom popup control when the user clicks the drop-down arrow.

To open the popup control in code, call the DropDownButton.ShowDropDown method. The DropDownButton.HideDropDown method closes the popup control.

The code sample below illustrates how to add a drop-down menu to a drop-down button.

DXPopupMenu popupMenu = new DXPopupMenu();
popupMenu.Items.Add(new DXMenuItem() { Caption = "Menu Item" });
popupMenu.Items.Add(new DXMenuCheckItem() { Caption = "Check Item" });
dropDownButton1.DropDownControl = popupMenu;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DropDownControl property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also