/// <summary>
        ///   The edit display element.
        /// </summary>
        private void EditDisplayElement()
        {
            var displayElement = this.CurrentDisplayElement;
            if (displayElement == null)
            {
                return;
            }

            var viewModel = new ElementEditorViewModel(this.Channels, displayElement);
            using (var editor = new ElementEditor(viewModel))
            {
                editor.ShowDialog();
            }
        }
 /// <summary>
 ///   The add element.
 /// </summary>
 private void AddElement()
 {
     var displayElement = new DisplayElement(10, 10, 100, 0, 0, 100, new List<PixelMapping>(), true)
         { Name = "My New Element" };
     var viewModel = new ElementEditorViewModel(this.Channels, displayElement);
     using (var editor = new ElementEditor(viewModel))
     {
         editor.ShowDialog();
         this.DisplayElements.Add(displayElement);
         this.CurrentDisplayElement = displayElement;
     }
 }