Back to Devexpress

AppBarButton.Label Property

wpf-devexpress-dot-xpf-dot-windowsui-dot-appbarbutton.md

latest3.4 KB
Original Source

AppBarButton.Label Property

Gets or sets the object used to render the label of the app bar button.

Namespace : DevExpress.Xpf.WindowsUI

Assembly : DevExpress.Xpf.Controls.v25.2.dll

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public object Label { get; set; }
vb
Public Property Label As Object

Property Value

TypeDescription
Object

The object used to render the label of the button.

|

Remarks

A button label specified by the Label property can be any Object. In most cases, you use a String value to specify the AppBarButton‘s label. It is also possible to use a custom object to represent the label and apply a data template to render the AppBarButton‘s label. For this purpose, the AppBarButton provides the AppBarButton.LabelTemplate and AppBarButton.LabelTemplateSelector properties. To learn more on how to apply a data template to render the label, see the AppBar Control topic.

Buttons can be displayed without labels by setting the AppBarButton.IsCompact property to true.

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

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.

wpf-appbar-display-windows-10-top-bottom-menu/CS/AppBarExample/MainWindow.xaml#L10

xml
<dxwui:AppBar x:Name="appBar" IsOpen="True" HideMode="Sticky" IsExitButtonEnabled="True">
    <dxwui:AppBarButton Content="T" Label="Top" Click="OnMoveAppBarTop"/>
    <dxwui:AppBarButton Content="B" Label="Bottom" Click="OnMoveAppBarBottom"/>

See Also

LabelTemplate

LabelTemplateSelector

AppBar.IsCompact

AppBarButton.IsCompact

AppBar Control

AppBarButton Class

AppBarButton Members

DevExpress.Xpf.WindowsUI Namespace