public WPFGraphView(Panel container) { this.CoreView = new GiCoreView(); this._view = new WPFViewAdapter(this); this.CoreView.createView(this._view); MainCanvas = new WPFMainCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight }; TempCanvas = new WPFTempCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight }; TempCanvas.Background = new SolidColorBrush(Colors.Transparent); container.Children.Add(MainCanvas); container.Children.Add(TempCanvas); Panel.SetZIndex(TempCanvas, 1); container.SizeChanged += new SizeChangedEventHandler(container_SizeChanged); this.CoreView.onSize(_view, (int)container.ActualWidth, (int)container.ActualHeight); }
private void init(Panel container) { MainCanvas = new WPFMainCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight }; TempCanvas = new WPFTempCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight }; TempCanvas.Background = new SolidColorBrush(Colors.Transparent); container.Children.Add(MainCanvas); container.Children.Add(TempCanvas); Panel.SetZIndex(TempCanvas, 1); container.SizeChanged += new SizeChangedEventHandler(container_SizeChanged); this.CoreView.onSize(_view, (int)container.ActualWidth, (int)container.ActualHeight); }