Bar

BarItem.Content Property

Gets or sets the bar item's content. This is a dependency property.

Namespace: DevExpress.Xpf.Bars

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

Declaration

public object Content { get; set; }
Public Property Content As Object

Property Value

Type Description
Object

The data that is the bar item's content.

Remarks

For BarEditItem objects, the object specified by the Content property is displayed before the item's edit box. The object specified by the BarEditItem.Content2 property is displayed after the edit box.

NOTE

BarItem objects can be displayed in multiple places simultaneously (for instance, in a Ribbon Page Group and Ribbon Quick Access Toolbar), while it is not possible to display the same UIElement in multiple places simultaneously. Therefore it is not possible to use UIElement objects as BarItems' contents.

Examples

This example shows how to create bar items and associate them with a custom Format category.

The following image shows the result:

E1543

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

Namespace WpfApplication3
    ''' <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
See Also