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

BarButtonItem Class

Represents a bar button item.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

public class BarButtonItem :
    BarItem

Remarks

Use this item to add a regular button to bars and menus.

BarButtonItem

Clicking a button invokes the BarItem.ItemClick and BarManager.ItemClick events. In addition, if a command is assigned to the BarItem.Command property, it’s invoked as well.

The item’s functionality can also be invoked by pressing the shortcut specified by the BarItem.KeyGesture property.

Example

This example shows how to create bar button items (BarButtonItem objects) and add a link separator between them. The separator is created using the DevExpress.Wpf.Bars.BarItemLinkSeparator class.

The following image shows the result:

E1575

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

Namespace BarItemLinkSeparatorEx
    ''' <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 snippets (auto-collected from DevExpress Examples) contain references to the BarButtonItem 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.

Implements

See Also