windowsforms-devexpress-dot-xtrabars-dot-barbuttonitem-e76b4258.md
Gets or sets the BarButtonItem‘s caption.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public override string Caption { get; set; }
Public Overrides Property Caption As String
| Type | Description |
|---|---|
| String |
A String value that is the BarButtonItem‘s caption.
|
You can format BarButtonItem’s Caption and BarButtonItem.Description via HTML tags if the BarItem.AllowHtmlText property equals true.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Caption 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.
BarButtonItem barItem = new BarButtonItem();
barItem.Caption = caption;
barItem.ImageOptions.SvgImage = barImage;
reporting-winforms-export-doc-odt/CS/WindowsFormsApplication1/Form1.cs#L40
barItem.ItemClick += new ItemClickEventHandler(barItem_ItemClick);
barItem.Caption = "DOC File";
control.AddItem(barItem);
connect-winforms-grid-to-dotnetcore-service-enable-pbac/CS/WinForms.Client/MainForm.cs#L78
EvaluateRoles();
logOutItem.Caption = $"Log out {DataServiceClient.Name}{(userIsWriter ? " (Writer)" : "")}";
if (overlayHandle is not null)
winforms-pdf-viewer-manage-popup-menu-items/CS/RemoveItemsFromPopupMenu/Form1.cs#L22
BarButtonItem browseBarButton = new BarButtonItem();
browseBarButton.Caption = "Custom Item";
dashboard-constant-lines/CS/ConstantLineExtension.Win/ConstantLineModule.cs#L100
BarButtonItem barItem = new BarButtonItem();
barItem.Caption = barButtonCaption;
barItem.ImageOptions.SvgImage = global::ConstantLineExtension.Win.Properties.Resources.ConstantLineSettings;
Dim barItem As New BarButtonItem()
barItem.Caption = caption
barItem.ImageOptions.SvgImage = barImage
reporting-winforms-export-doc-odt/VB/WindowsFormsApplication1/Form1.vb#L40
AddHandler barItem.ItemClick, AddressOf barItem_ItemClick
barItem.Caption = "DOC File"
control.AddItem(barItem)
winforms-pdf-viewer-manage-popup-menu-items/VB/RemoveItemsFromPopupMenu/Form1.vb#L20
Dim browseBarButton As BarButtonItem = New BarButtonItem()
browseBarButton.Caption = "Custom Item"
' Insert the bar buttom item into the PDF Viewer popup menu and start a new group.
winforms-assign-popupmenu-to-dropdownbutton/VB/DropDownButtonExample/Form1.vb#L29
Dim item As BarButtonItem = New BarButtonItem()
item.Caption = caption
item.Id = barManager1.GetNewItemId()
See Also