/// <summary> /// Removes and object from the canvas. /// </summary> /// <param name="co">The object to remove.</param> public void RemoveObject(ICanvasObject co) { co.RedrawEvent -= HandleRedrawEvent; if (co is CanvasContainer container) { container.CollectionChanged -= HandleChildrenChanged; } Objects.Remove(co); co.Dispose(); }
/// <summary> /// Removes and object from the canvas. /// </summary> /// <param name="co">The object to remove.</param> public void RemoveObject(ICanvasObject co) { co.RedrawEvent -= HandleRedrawEvent; Objects.Remove(co); co.Dispose(); }
/// <summary> /// Removes and object from the canvas. /// </summary> /// <param name="co">The object to remove.</param> public void RemoveObject(ICanvasObject co) { co.RedrawEvent -= HandleRedrawEvent; Objects.Remove (co); co.Dispose (); }