public DisplayItem Clone()
        {
            var item = new DisplayItem
            {
                Width            = Width,
                Height           = Height,
                LeftOffset       = LeftOffset,
                TopOffset        = TopOffset,
                ChannelLocations =
                    new ObservableCollection <ChannelLocation>(
                        ChannelLocations.Select(channelLocation => channelLocation.Clone()).ToList()),
                IsUnlocked = IsUnlocked
            };

            return(item);
        }
 /// <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;
 }
 public DisplayItem Clone()
 {
     var item = new DisplayItem
                {
                    Width = Width,
                    Height = Height,
                    LeftOffset = LeftOffset,
                    TopOffset = TopOffset,
                    ChannelLocations =
                        new ObservableCollection<ChannelLocation>(
                        ChannelLocations.Select(channelLocation => channelLocation.Clone()).ToList()),
                    IsUnlocked = IsUnlocked
                };
     return item;
 }