private static void SetZoomableCanvasScale(ItemsCanvas itemsCanvas, Point zoomCenter) { // Adjust the offset to make the point at the center of zoom area stay still double zoomFactor = itemsCanvas.Scale / itemsCanvas.ZoomableCanvas.Scale; Vector position = (Vector)zoomCenter; Vector moveOffset = position * zoomFactor - position; itemsCanvas.MoveAllItems(-moveOffset); itemsCanvas.ZoomableCanvas.Scale = itemsCanvas.Scale; }