Skip to main content

AppBarButton.LabelTemplate Property

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

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v24.1.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