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

ToolbarListItem Class

Represents a check list of available toolbars (and optionally, check lists of bar item links owned by the bars), allowing an end-user to toggle the visibility of bars/links.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v18.2.dll

Declaration

public class ToolbarListItem :
    BarListItem

Remarks

The contents of a ToolbarListItem object is automatically generated. If the ToolbarListItem.ListItemType property is set to ToolbarListItemType.ShowBars (default), the ToolbarListItem represents a list of existing bars in the form of a check list. Elements in the check list are check buttons displaying bar names. Clicking any check button toggles the visibility of the corresponding bar.

ToolbarListItem

If the ToolbarListItem.ListItemType property is set to ToolbarListItemType.ShowBarsAndItems, the ToolbarListItem represents each bar as a sub-menu. The sub-menu contains corresponding bar item links in the form of a check list, allowing an end-user to change the visibility of the links. In this mode, an end-user can modify the visibility of bar item links, not bars.

Example

This example shows how to create a ToolbarListItem, used to provide access to available toolbars. The ToolbarListItem object is added to the sub-menu displayed within the main menu.

The following image shows the result:

E1573

Imports System
Imports System.Collections.Generic
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Windows

Namespace ToolbarListItemEx
    ''' <summary>
    ''' Interaction logic for App.xaml
    ''' </summary>
    Partial Public Class App
        Inherits Application

        Private Sub OnAppStartup_UpdateThemeName(ByVal sender As Object, ByVal e As StartupEventArgs)

            DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName()
        End Sub
    End Class
End Namespace

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ToolbarListItem class.

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.

See Also