Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AppBarButton.LabelTemplate Property

Gets or sets the data template used to render the label.

Namespace: DevExpress.Xpf.WindowsUI

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

NuGet Package: DevExpress.Wpf.Controls

#Declaration

public DataTemplate LabelTemplate { get; set; }

#Property Value

Type Description
DataTemplate

The data template used to render the label.

#Remarks

The AppBarButton‘s label can be set via the AppBarButton.Label property of the Object type. If you assign an Object, other than String, to the AppBarButton.Label property, you can apply a data template to render the label. For this purpose, the AppBarButton provides the LabelTemplate property. If a DataTemplate is assigned to the LabelTemplate property, the AppBarButton‘s label is rendered according to this template.

If you want to create several data templates and apply one of them according to your own logic, use the AppBarButton.LabelTemplateSelector property. To learn more on how to apply data templates, see the AppBar Control topic.

See Also