internal void SetVisualLines(ICollection <VisualLine> visualLines) { foreach (VisualLineDrawingVisual v in visuals) { if (v.VisualLine.IsDisposed) { RemoveVisualChild(v); } } visuals.Clear(); foreach (VisualLine newLine in visualLines) { VisualLineDrawingVisual v = newLine.Render(); if (!v.IsAdded) { AddVisualChild(v); v.IsAdded = true; } visuals.Add(v); } InvalidateArrange(); }
internal VisualLineDrawingVisual Render() { if (visual == null) visual = new VisualLineDrawingVisual(this); return visual; }
internal VisualLineDrawingVisual Render() { Debug.Assert(phase == LifetimePhase.Live); if (visual == null) visual = new VisualLineDrawingVisual(this); return visual; }