IScrollMap.GetBufferPositionAtCoordinate Method (Double)

 

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
)

Parameters

coordinate
Type: System.Double

The scrollbar coordinate.

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotPoint

The corresponding buffer position.

Exception Condition
ArgumentOutOfRangeException

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.

Return to top
Show: