public override void OnApplied(IFigure figure, FrameworkElement element) { var line = element as Line; if (StrokeDashArray.IsEmpty()) { if (line != null) { line.StrokeDashArray = null; } return; } if (line != null) { var collection = new DoubleCollection(); collection.AddRange(this.StrokeDashArray); line.StrokeDashArray = collection; } }