Esempio n. 1
0
        /// <summary>
        ///   The add element.
        /// </summary>
        private void AddElement()
        {
            var displayElement = new DisplayItem();
            var viewModel      = new DisplayItemEditorViewModel {
                DisplayItem = displayElement
            };
            var editor = new DisplayItemEditorView {
                DataContext = viewModel
            };

            editor.ShowDialog();
            DisplayItems.Add(displayElement);
            CurrentDisplayElement = displayElement;
        }
Esempio n. 2
0
        private void EditDisplayElement()
        {
            var displayElement = CurrentDisplayElement;

            if (displayElement == null)
            {
                return;
            }

            var viewModel = new DisplayItemEditorViewModel {
                DisplayItem = displayElement
            };
            var editor = new DisplayItemEditorView {
                DataContext = viewModel
            };

            editor.ShowDialog();
        }
        private void EditDisplayElement()
        {
            var displayElement = CurrentDisplayElement;
            if (displayElement == null)
            {
                return;
            }

            var viewModel = new DisplayItemEditorViewModel { DisplayItem = displayElement };
            var editor = new DisplayItemEditorView { DataContext = viewModel };
            editor.ShowDialog();
        }
 /// <summary>
 ///   The add element.
 /// </summary>
 private void AddElement()
 {
     var displayElement = new DisplayItem();
     var viewModel = new DisplayItemEditorViewModel { DisplayItem = displayElement };
     var editor = new DisplayItemEditorView { DataContext = viewModel };
     editor.ShowDialog();
     DisplayItems.Add(displayElement);
     CurrentDisplayElement = displayElement;
 }