public override object Copy(IDictionary <object, object>?shared) { var copy = new FillStyleViewModel(ServiceProvider) { Name = Name, Color = _color?.CopyShared(shared) }; return(copy); }
public override object Copy(IDictionary <object, object>?shared) { var copy = new StrokeStyleViewModel(ServiceProvider) { Name = Name, Color = _color?.CopyShared(shared), Thickness = _thickness, LineCap = _lineCap, Dashes = _dashes, DashOffset = _dashOffset, StartArrow = _startArrow?.CopyShared(shared), EndArrow = _endArrow?.CopyShared(shared) }; return(copy); }
public override object Copy(IDictionary<object, object>? shared) { var layers = _layers.CopyShared(shared).ToImmutable(); var currentLayer = _currentLayer.GetCurrentItem(ref _layers, ref layers); var currentShape = _currentShape.GetCurrentItem(ref _layers, ref layers, x => x.Shapes); var properties = _properties.CopyShared(shared).ToImmutable(); var copy = new TemplateContainerViewModel(ServiceProvider) { Name = Name, IsVisible = IsVisible, IsExpanded = IsExpanded, Layers = layers, CurrentLayer = currentLayer, WorkingLayer = _workingLayer?.CopyShared(shared), HelperLayer = _helperLayer?.CopyShared(shared), CurrentShape = currentShape, Properties = properties, Record = _record, Width = Width, Height = Height, Background = _background?.CopyShared(shared), IsGridEnabled = IsGridEnabled, IsBorderEnabled = IsBorderEnabled, GridOffsetLeft = GridOffsetLeft, GridOffsetTop = GridOffsetTop, GridOffsetRight = GridOffsetRight, GridOffsetBottom = GridOffsetBottom, GridCellWidth = GridCellWidth, GridCellHeight = GridCellHeight, GridStrokeColor = _gridStrokeColor?.CopyShared(shared), GridStrokeThickness = GridStrokeThickness }; return copy; }