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.1.dll

Declaration

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

Property Value

Type Description
ControlTemplate

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

Examples

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

NOTE

A complete sample project is available at https://github.com/DevExpress-Examples/imageedit-menucustomization-e2563.

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