IScrollMap.GetBufferPositionAtCoordinate Method

Gets the buffer position that corresponds to a scrollmap coordinate.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

SnapshotPoint GetBufferPositionAtCoordinate(
	double coordinate


Type: System.Double

The scrollbar coordinate.

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotPoint
The corresponding buffer position.


coordinate is NaN, less than 0.0 or greater than Maximum.

Different buffer positions can have the same scroll bar coordinates. This method is guaranteed only to be consistent: it returns the same position for the same coordinate. The exact character returned depends on the implementation of the scroll map. It is generally the first character on the line.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft