public void Add(Connection conn) { connections.Add(conn); diagram.Control.Children.Add(conn.Control); conn.Control.ContainerCanvas = diagram.Control; conn.Owner = diagram; Canvas.SetZIndex(conn.Control, Count); }
public void Remove(Connection conn) { conn.Sink = null; conn.Source = null; conn.Owner = null; conn.Control.ContainerCanvas = null; connections.Remove(conn); diagram.Control.Children.Remove(conn.Control); }