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)
Syntax
声明
Function GetBufferPositionAtCoordinate ( _
coordinate As Double _
) As SnapshotPoint
SnapshotPoint GetBufferPositionAtCoordinate(
double coordinate
)
SnapshotPoint GetBufferPositionAtCoordinate(
double coordinate
)
abstract GetBufferPositionAtCoordinate :
coordinate:float -> SnapshotPoint
function GetBufferPositionAtCoordinate(
coordinate : double
) : SnapshotPoint
Parameters
- coordinate
Type: System.Double
The scrollbar coordinate.
Return Value
Type: Microsoft.VisualStudio.Text.SnapshotPoint
The corresponding buffer position.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | coordinate is NaN, less than 0.0 or greater than Maximum. |
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.