public Vector() { Line = new Segment(); // Line's dependencies established by OnDependenciesChanged() Line.Style = new LineStyle() { StrokeWidth = 0, Color = Colors.Transparent }; // Line is invisible Arrow = new Arrow(); Arrow.ZIndex = (int)ZOrder.Vectors; Arrow.Dependencies.Add(Line); Children.Add(Line, Arrow); ZIndex = (int)ZOrder.Vectors; }
public override void OnAddingToCanvas(Canvas newContainer) { base.OnAddingToCanvas(newContainer); Arrow.EnsureStyleAssigned(); }