예제 #1
0
        public DisplayItem Clone()
        {
            var item = new DisplayItem
            {
                Width       = Width,
                Height      = Height,
                LeftOffset  = LeftOffset,
                TopOffset   = TopOffset,
                NodeLayouts = new ObservableCollection <NodeLayout>(NodeLayouts.Select(x => x.Clone()).ToList()),
                IsUnlocked  = IsUnlocked,
                Name        = Name
            };

            return(item);
        }
예제 #2
0
 public DisplayItem Clone()
 {
     var item = new DisplayItem
                {
                    Width = Width,
                    Height = Height,
                    LeftOffset = LeftOffset,
                    TopOffset = TopOffset,
                    NodeLayouts = new ObservableCollection<NodeLayout>(NodeLayouts.Select(x => x.Clone()).ToList()),
                    IsUnlocked = IsUnlocked,
                    Name = Name
                };
     return item;
 }
예제 #3
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;
 }