ZoomAboutLogicalPoint Method
Collapse the table of content
Expand the table of content

MultiScaleImage.ZoomAboutLogicalPoint Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Enables a user to zoom in on a point of the MultiScaleImage.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Sub ZoomAboutLogicalPoint ( _
	zoomIncrementFactor As Double, _
	zoomCenterLogicalX As Double, _
	zoomCenterLogicalY As Double _
)

Parameters

zoomIncrementFactor
Type: System.Double
Specifies the zoom. This number is greater than 0. A value of 1 specifies that the image fit the allotted page size exactly. A number greater than 1 specifies to zoom in. If a value of 0 or less is used, failure is returned and no zoom changes are applied.
zoomCenterLogicalX
Type: System.Double
X coordinate for the point on the MultiScaleImage that is zoomed in on. This is a logical point (between 0 and 1).
zoomCenterLogicalY
Type: System.Double
Y coordinate for the point on the MultiScaleImage that is zoomed in on. This is a logical point (between 0 and 1).

This method enables zooming and panning on the MultiScaleImage. The first parameter (zoomIncrementFactor) is the zoom multiplier which is incremented from the current zoom factor of the image. For example, a value of 1 specifies the default zoom and a value of 3 specifies that it is zoomed in 3 times. If you want to zoom again using the same value, you would zoom in at 3 * 3 which is 9 times from the default size.

The second and third parameters of the ZoomAboutLogicalPoint method are the respective x and y coordinates of the logical point of where to zoom around (and where to pan to). A logical point uses normalized values (between 0 and 1) for x and y positions within the image. Therefore, the value 0.5, 0.5 is in the middle of the image because 0.5 is in the middle of 0 and 1. If you specified a coordinate value less than or equal to 0 or greater than or equal to 1, the image would pan completely out of view.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft