private void OnGraphControlMouseWheel(object sender, MouseWheelEventArgs e)
        {
            ZoomAndPanControl.ZoomAboutPoint(
                ZoomAndPanControl.ContentScale + e.Delta / 1000.0f,
                e.GetPosition(GraphControl));

            e.Handled = true;
        }
Exemple #2
0
 /// <summary>
 /// Zoom the viewport in, centering on the specified point (in content coordinates).
 /// </summary>
 private void ZoomIn(Point contentZoomCenter)
 {
     ZoomAndPanControl.ZoomAboutPoint(ZoomAndPanControl.ContentScale + 0.1, contentZoomCenter);
 }
 /// <summary>
 /// Zoom the viewport out, centering on the specified point (in content coordinates).
 /// </summary>
 private void ZoomOut(Point contentZoomCenter) => ZoomAndPanControl.ZoomAboutPoint(ZoomAndPanControl.ContentScale - 0.1, contentZoomCenter);
 // Zoom the viewport in by a small increment
 public static void ZoomIn(ZoomAndPanControl z, Point contentZoomCenter)
 {
     z.ZoomAboutPoint(z.ContentScale + 0.1, contentZoomCenter);
 }
Exemple #5
0
 private void CvZoomOut(Point point)
 {
     ZoomAndPanControl.ZoomAboutPoint(ZoomAndPanControl.ContentScale - 0.1, point);
 }