/// <summary> /// Attaches the elements to the specified host. /// </summary> /// <param name="host">The host.</param> public void Attach(IRenderHost host) { if (!IsAttached) { foreach (var e in this.OwnedRenderables) { e.Attach(host); } SharedModelContainerInternal?.Attach(host); foreach (var e in this.D2DRenderables) { e.Attach(host); } IsAttached = true; } }
/// <summary> /// Detaches the elements. /// </summary> public void Detach() { if (IsAttached) { IsAttached = false; foreach (var e in this.OwnedRenderables) { e.Detach(); } SharedModelContainerInternal?.Detach(); foreach (var e in this.D2DRenderables) { e.Detach(); } } }
/// <summary> /// Attaches the elements to the specified host. /// </summary> /// <param name="host">The host.</param> public void Attach(IRenderHost host) { if (!IsAttached) { foreach (var e in this.OwnedRenderables) { e.Attach(EffectsManager); e.Invalidated += NodeInvalidated; } SharedModelContainerInternal?.Attach(host); foreach (var e in this.D2DRenderables) { e.Attach(host); } IsAttached = true; } }