private void DoZoom(double factor, Point?mousePos = null) { if (masterPlot != null) { var rect = masterPlot.PlotRect; ValidateNavigationLimits(); rect = NavigationHelper.DoZoom(factor, mousePos, rect, NavigationLimitMaxX, NavigationLimitMinX, NavigationLimitMaxY, NavigationLimitMinY, IsHorizontalNavigationEnabled, IsVerticalNavigationEnabled, PreferredAspectRatio, masterPlot.AspectRatio); if (IsZoomEnable(rect)) { masterPlot.SetPlotRect(rect); masterPlot.IsAutoFitEnabled = false; } } }