Skip to main content

ButtonEditSettings.ButtonTemplate Property

Gets or sets the data template used to render buttons of the ButtonEdit. This is a dependency property.

Namespace: DevExpress.Xpf.Editors.Settings

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public DataTemplate ButtonTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object that is used to render buttons of the ButtonEdit.

Property Paths

You can access this nested property as listed below:

Object Type Path to ButtonTemplate
TokenEditorBehavior
.NewTokenEditSettings .ButtonTemplate
TokenEditorBehavior
.TokenEditSettings .ButtonTemplate

Remarks

The ButtonTemplate property specifies the data template used to render buttons from the ButtonEditSettings.ButtonsSource collection.

<dxe:ButtonEditSettings.ButtonTemplate>
    <DataTemplate>
        <ContentControl>
            <dxe:ButtonInfo 
                Command="{Binding Command}"
                Content="{Binding Content}"
                IsLeft="{Binding IsLeft}" />
        </ContentControl>
    </DataTemplate>
</dxe:ButtonEditSettings.ButtonTemplate>

If you want to declare several data templates and apply one of them according to your own logic, use the ButtonEditSettings.ButtonTemplateSelector property.

See Also