windowsforms-devexpress-dot-xtrabars-dot-baritem-251a7ee1.md
Gets or sets a comma-separated list of keywords by which this bar item can be found using the ribbon search menu.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Behavior")]
public string SearchTags { get; set; }
<DefaultValue(Nothing)>
<DXCategory("Behavior")>
Public Property SearchTags As String
| Type | Default | Description |
|---|---|---|
| String | null |
A string value that specifies a comma-separated list of keywords.
|
Using the search menu, a user can find a bar item by its Caption. The SearchTags property allows you to provide custom keywords by which this bar item can also be found.
using DevExpress.XtraBars;
BarButtonItem closeButton = new BarButtonItem();
closeButton.Caption = "Close";
closeButton.SearchTags = "Quit, Exit";
closeButton.ItemClick += CloseButton_ItemClick;
ribbonControl1.Items.Add(closeButton);
ribbonPageGroup1.ItemLinks.Add(closeButton);
private void CloseButton_ItemClick(object sender, ItemClickEventArgs e) {
this.Close();
}
Imports DevExpress.XtraBars
Dim closeButton As New BarButtonItem()
closeButton.Caption = "Close"
closeButton.SearchTags = "Quit, Exit"
AddHandler closeButton.ItemClick, AddressOf CloseButton_ItemClick
ribbonControl1.Items.Add(closeButton)
ribbonPageGroup1.ItemLinks.Add(closeButton)
Private Sub CloseButton_ItemClick(ByVal sender As Object, ByVal e As ItemClickEventArgs)
Me.Close()
End Sub
See Also