Skip to main content
A newer version of this page is available. .

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core

Declaration

public ControlTemplate MenuTemplate { get; set; }

Property Value

Type Description
ControlTemplate

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

Example

This example shows how to customize the editor's menu and display custom buttons used to apply image effects.

View Example

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Effects;

namespace CustomizationDemo {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
        }

        private void OnApplyEffectButtonClick(object sender, RoutedEventArgs e) {
            if(edit.ImageEffect == null)
                edit.ImageEffect = new GrayscaleEffect();
        }

        private void OnUndoEffectButtonClick(object sender, RoutedEventArgs e) {
            edit.ImageEffect = null;
        }
    }
}
See Also