public override void InitializeScottPlot() { view.Find <TextBlock>("lblVersion").Text = Tools.GetVersionString(); //isDesignerMode = DesignerProperties.GetIsInDesignMode(this); isDesignerMode = false; settings = plt.GetSettings(showWarning: false); var mainGrid = view.Find <Ava.Controls.Grid>("mainGrid"); if (isDesignerMode) { // hide the plot mainGrid.RowDefinitions[1].Height = new GridLength(0); } else { // hide the version info mainGrid.RowDefinitions[0].Height = new GridLength(0); using (var bmp = new Bitmap(1, 1)) using (var gfx = GDI.Graphics(bmp, lowQuality: true)) { dpiScaleOutput = gfx.DpiX / 96; } view.Find <StackPanel>("canvasDesigner").Background = view.transparentBrush; var canvasPlot = view.Find <Canvas>("canvasPlot"); canvasPlot.Background = view.transparentBrush; CanvasSizeChanged((int)(canvasPlot.Bounds.Width), (int)(canvasPlot.Bounds.Height)); } }
public override void InitializeScottPlot() { view.Find <TextBlock>("lblVersion").Text = Tools.GetVersionString(); //isDesignerMode = DesignerProperties.GetIsInDesignMode(this); isDesignerMode = false; settings = plt.GetSettings(showWarning: false); var mainGrid = view.Find <Ava.Controls.Grid>("mainGrid"); if (isDesignerMode) { // hide the plot mainGrid.RowDefinitions[1].Height = new GridLength(0); } else { // hide the version info mainGrid.RowDefinitions[0].Height = new GridLength(0); //CanvasPlot_SizeChanged(null, null); //dpiScaleInput = settings.gfxFigure.DpiX / 96; THIS IS ONLY NECESSARY ON WPF dpiScaleOutput = settings.gfxFigure.DpiX / 96; view.Find <StackPanel>("canvasDesigner").Background = view.transparentBrush; view.Find <Canvas>("canvasPlot").Background = view.transparentBrush; } }