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

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.2.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