コード例 #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
ファイル: DisplayItem.cs プロジェクト: akonkman/vixen-modules
 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;
 }