public virtual void OnPlotterAttached(Plotter plotter) { this.plotter = (Plotter2D)plotter; dxHost = this.plotter.Children.OfType<DirectXHost>().FirstOrDefault(); if (dxHost == null) throw new InvalidOperationException("First add DirectXHost to plotter.Children"); dxHost.AddChild(this); dxHost.Render += OnDirectXRender; }
public virtual void OnPlotterAttached(Plotter plotter) { this.plotter = (Plotter2D)plotter; dxHost = this.plotter.Children.OfType <DirectXHost>().FirstOrDefault(); if (dxHost == null) { throw new InvalidOperationException("First add DirectXHost to plotter.Children"); } dxHost.AddChild(this); dxHost.Render += OnDirectXRender; }