Skip to main content
Bar

BarItems.CreateSplitButton(String, PopupMenu) Method

Creates a new split button and adds it to the collection.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public BarButtonItem CreateSplitButton(
    string caption,
    PopupMenu menu
)

Parameters

Name Type Description
caption String

A String value that specifies the item’s caption. This value is assigned to the BarItem.Caption property.

menu PopupMenu

A PopupMenu object that represents the button’s drop down control. This value is assigned to the BarButtonItem.DropDownControl property.

Returns

Type Description
BarButtonItem

A BarButtonItem object that represents the created bar item.

Remarks

The CreateSplitButton method creates a new instance of the BarButtonItem class with the specified BarItem.Caption and BarButtonItem.DropDownControl properties and adds it to the current collection. The item’s BarButtonItem.ButtonStyle property is set to the BarButtonStyle.DropDown value.

See Also