Back to Devexpress

ImageEdit.MenuTemplate Property

wpf-devexpress-dot-xpf-dot-editors-dot-imageedit-9bcf1b32.md

latest2.3 KB
Original Source

ImageEdit.MenuTemplate Property

Gets or sets the template used to display the Image Menu. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public ControlTemplate MenuTemplate { get; set; }
vb
Public Property MenuTemplate As ControlTemplate

Property Value

TypeDescription
ControlTemplate

A ControlTemplate object that represents the template used to display the image menu.

|

Remarks

The following code sample demonstrates how to customize the editor menu and display custom buttons:

xaml
<dxe:ImageEdit>
    <dxe:ImageEdit.MenuTemplate>
        <ControlTemplate>
            <StackPanel Orientation="Horizontal">
                <dxe:ImageEditToolButton ToolTip="Grayscale" 
                                         Click="OnApplyEffectButtonClick"
                                         ImageSource="/CustomizationDemo;component/Images/inactive.png"/>
                <dxe:ImageEditToolButton ToolTip="Normal" 
                                         Click="OnUndoEffectButtonClick"
                                         ImageSource="/CustomizationDemo;component/Images/active.png"/>
                <dxe:ImageEditToolSeparator/>
                <dxe:ImageEditCopyToolButton/>
                <dxe:ImageEditLoadToolButton/>
                <dxe:ImageEditSaveToolButton/>
            </StackPanel>
        </ControlTemplate>
    </dxe:ImageEdit.MenuTemplate>
</dxe:ImageEdit>

See Also

ImageEdit Class

ImageEdit Members

DevExpress.Xpf.Editors Namespace