Skip to main content
A newer version of this page is available. .

Recently Used Items

  • 3 minutes to read

Usually applications provide more features than users need in their everyday work. However on occasion, these rarely used features are required. Take these points into consideration when designing menus using the DevExpress Ribbon, Menu and Docking Library. This topic describes the functionality introduced by XtraBars to dynamically control the visibility of sub-menu items depending on their popularity.

Recently and not Recently Used Items

Items within submenus can be divided into two groups: recently used and not recently used. Recently used items are always displayed when submenus are opened. Items not recently used are hidden when submenus are opened, their visibility is controlled automatically depending on the popularity of the items. Such an item will be classed as recently used after an end-user has selected the item a number of times.

An end-user can access items not recently used via the double down-arrow at the bottom of the menu. They can hover over the arrow for a short while or click it to immediately access the items.

CD_RecentlyUsed_OnlyRecentlyUsed

The next image shows the same menu after the items not recently used are displayed:

CD_RecentlyUsed_AllItems

By default, all bar item links are recently used. You can specify that a submenu’s link is not recently used via the link’s context menu. Uncheck the Most recently used option for this purpose:

CD_RecentlyUsed_SetMostRecentlyUsed_AtDesTime

To change this attribute via code, use the Boolean BarItemLink.MostRecentlyUsed property.

Settings

XtraBars allows you to control which items are classed as not recently used, via the BarManagerProperties.MostRecentItemsPercent property. This property indirectly determines the minimum number of clicks required to change the links classed as not recently used to recently used and therefore visible. If the link’s press count is less than this number, it will be hidden.

If this property’s value is set to 100, all links will always be classed as recently used and visible. The lower the value the quicker links not recently accessed will be hidden.

It is also possible to prevent links not recently used from being hidden. For this purpose, set the BarManager.ShowFullMenus property to true. An end-user can also disable the most recently used items mechanism at runtime via the Customization Window dialog. They just need to enable the Always show full menus option in the Customization Window’s Options page.

The BarManager.ShowFullMenusAfterDelay property specifies whether items not recently used should appear if the mouse cursor remains within the submenu for a while. This feature is enabled only if the BarManager.ShowFullMenus property is set to false. To enable displaying not recently used items after a delay at runtime, the end-user can select the Show full menus after a short delay option in the Customization window.

Runtime - CustomizationWindow - Options

See Also