Partager via


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

'Déclaration
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

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

See Also

Reference

IScrollMap Interface

Microsoft.VisualStudio.Text.Editor Namespace