ElementToLogicalPoint Method
Collapse the table of content
Expand the table of content

MultiScaleImage.ElementToLogicalPoint Method

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

Gets a point with logical coordinates (values between 0 and 1) from a point of the MultiScaleImage.

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

'Declaration
Public Function ElementToLogicalPoint ( _
	elementPoint As Point _
) As Point

Parameters

elementPoint
Type: System.Windows.Point
The point on the MultiScaleImage to translate into a point with logical coordinates (values between 0 and 1).

Return Value

Type: System.Windows.Point
The logical point translated from the elementPoint.

Logical coordinates (also known as normalized coordinates) are between 0 and 1. This method takes a coordinate of the MultiScaleImage and returns the corresponding logical coordinate. For example, if the MultiScaleImage is 800 x 800 logical pixels, then the center point is at the coordinates of 400, 400. If you specified an elementPoint with coordinates of 400, 400, then this method would return a point with logical coordinates of 0.5, 0.5.

This method is useful in conjunction with the ZoomAboutLogicalPoint method, which only takes logical points. For example, you can use the ElementToLogicalPoint method to translate the current point in the MultiScaleSubImage into a logical point. Then you can use that logical point in the ZoomAboutLogicalPoint method to zoom in on that point.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft