コード例 #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;
        }
コード例 #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();
        }
コード例 #3
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();
        }
コード例 #4
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;
 }