Back to Devexpress

AppBarButton.LabelTemplateSelector Property

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

latest2.2 KB
Original Source

AppBarButton.LabelTemplateSelector Property

Gets or sets the DataTemplateSelector object that provides a way to choose a DataTemplate used to render the label.

Namespace : DevExpress.Xpf.WindowsUI

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

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public DataTemplateSelector LabelTemplateSelector { get; set; }
vb
Public Property LabelTemplateSelector As DataTemplateSelector

Property Value

TypeDescription
DataTemplateSelector

The DataTemplateSelector object that provides a way to choose a DataTemplate used to render the label.

|

Remarks

You can declare several data templates and apply one of them to render the AppBarButton‘s label according to your own logic. To implement this approach, first create the System.Windows.Controls.DataTemplateSelector descendant and override the DataTemplateSelector.SelectTemplate method to realize the template selection logic. Then, assign an instance of this object to the LabelTemplateSelector property and declare your data templates. The data templates can be defined in the window resources dictionary. To learn more on how to apply a data template selector, see the AppBar Control topic.

See Also

LabelTemplate

Label

AppBar Control

AppBarButton Class

AppBarButton Members

DevExpress.Xpf.WindowsUI Namespace