// Event raised on mouse up in the ZoomAndPanControl private void zoomAndPanControl_MouseUp(object sender, MouseButtonEventArgs e) { ZoomAndPanEvents.MouseUp(sender, e, zoomAndPanControl); if (zoomAndPanControl.ContentScale < 0.15) { zoomAndPanControl.ContentScale = 0.15; } }
// Event raised on mouse up in the ZoomAndPanControl private void zoomAndPanControl_MouseUp(object sender, MouseButtonEventArgs e) { if (positionMouse == e.GetPosition(this)) { canvas1.Children.Remove(rotationCenter); double x1 = Canvas.GetLeft(rect); double y1 = Canvas.GetTop(rect); Point p = new Point(); p = e.GetPosition(canvas1); rotationCenter = CreateEllipse(6, 6, p.X, p.Y); canvas1.Children.Add(rotationCenter); rotate.CenterX = p.X - x1; rotate.CenterY = p.Y - y1; } ZoomAndPanEvents.MouseUp(sender, e, zoomAndPanControl); }
// Event raised on mouse up in the ZoomAndPanControl private void zoomAndPanControl_MouseUp(object sender, MouseButtonEventArgs e) { ZoomAndPanEvents.MouseUp(sender, e, zoomAndPanControl); }