public void RemoveChild(IWidget widget, Framework.UIElement child) { this._skiaView.PaintSurface -= _skiaView_PaintSurface; Container.Controls.Remove(_skiaView); this._skiaView.Dispose(); this._skiaView = null; _root.Invalidated -= _root_LayoutUpdated; _root = null; }
public void AddChild(IWidget widget, Framework.UIElement child) { _skiaView = new SkiaSharp.Views.Desktop.SKGLControl(); this._skiaView.Dock = System.Windows.Forms.DockStyle.Fill; this._skiaView.PaintSurface += _skiaView_PaintSurface; this._skiaView.MouseMove += _skiaView_MouseMove; this._skiaView.MouseDown += _skiaView_MouseDown; this._skiaView.MouseUp += _skiaView_MouseUp; Container.Controls.Add(_skiaView); _root = child; _root.Invalidated += _root_LayoutUpdated; _skiaView.Invalidate(); }