Поделиться через


ITextViewLine.GetBufferPositionFromXCoordinate Method (Double)

Gets the buffer position of the character whose character bounds contains the given x-coordinate.

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

Syntax

'Декларация
Function GetBufferPositionFromXCoordinate ( _
    xCoordinate As Double _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
    double xCoordinate
)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
    double xCoordinate
)
abstract GetBufferPositionFromXCoordinate : 
        xCoordinate:float -> Nullable<SnapshotPoint> 
function GetBufferPositionFromXCoordinate(
    xCoordinate : double
) : Nullable<SnapshotPoint>

Parameters

  • xCoordinate
    Type: System.Double
    The x-coordinate of the desired character.

Return Value

Type: System.Nullable<SnapshotPoint>
The text buffer-based point of the character at xCoordinate, or null if there is no character at that position.

Remarks

This is equivalent to GetBufferPositionFromXCoordinate(xCoordinate, false).

.NET Framework Security

See Also

Reference

ITextViewLine Interface

GetBufferPositionFromXCoordinate Overload

Microsoft.VisualStudio.Text.Formatting Namespace