[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Collapse]Ribbon, Bars and Menu
   [Expand]Bars
   [Collapse]Ribbon
    [Expand]The Ribbon UI
    [Collapse]Visual Elements
      Ribbon Page
      Ribbon Page Group
      Categories and Contextual Tabs
      Quick Access Toolbar
      Page Header Items
      Application Button
      Search Menu
    [Expand]Items and Item Links
     Ribbon Styles
    [Expand]Galleries
    [Expand]Main Menus
    [Expand]Ribbon Control Designer
    [Expand]Runtime Capabilities
    [Expand]Miscellaneous
     Known Issues
   [Expand]Popup Menus
    Radial Menu
   [Expand]Common Features
   [Expand]Examples
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Search Menu

The ribbon can display a search box that allows users to search for a bar item by its caption or tags.

To display the search box, set the RibbonControl.ShowSearchItem property to true. The RibbonControl.SearchItemShortcut property allows you to specify the shortcut used to focus the search box.

Expanded Bar Items in the Menu

The search menu finds a bar item by its BarItem.Caption. Use the BarItem.SearchTags property to provide custom keywords that can be used to locate the bar item.

To hide a bar item in the search menu, set its BarItem.VisibleInSearchMenu property to false.

Expanded Customize the Menu

The RibbonControl.CustomizeSearchMenu event fires when the query in the search box changes, and allows you to customize the menu. The following properties provide information specific to this event:

  • SearchString - gets the search query;
  • Menu - gets the search menu (see PopupMenu (see PopupMenu)). The Menu.ItemLinks collection contains all the available Bar Item Links. An item link is visible or hidden based on the current search query.

The code below shows how to add a custom button to the menu, show an item regardless of the current query, and change the message shown when no items are found.

Expanded Localize the Menu

Use the Localization Service to add culture-specific messages to the search menu. The code below shows how to localize the message shown when the menu has no search query.

Is this topic helpful?​​​​​​​