Partager via


ITextViewLine.GetInsertionBufferPositionFromXCoordinate Method

Gets the buffer position used if new data were to be inserted at the given x-coordinate.

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

Syntax

'Declaration
Function GetInsertionBufferPositionFromXCoordinate ( _
    xCoordinate As Double _
) As VirtualSnapshotPoint
VirtualSnapshotPoint GetInsertionBufferPositionFromXCoordinate(
    double xCoordinate
)
VirtualSnapshotPoint GetInsertionBufferPositionFromXCoordinate(
    double xCoordinate
)
abstract GetInsertionBufferPositionFromXCoordinate : 
        xCoordinate:float -> VirtualSnapshotPoint
function GetInsertionBufferPositionFromXCoordinate(
    xCoordinate : double
) : VirtualSnapshotPoint

Parameters

  • xCoordinate
    Type: Double

    The x-coordinate of the desired point.

Return Value

Type: Microsoft.VisualStudio.Text.VirtualSnapshotPoint
The VirtualSnapshotPoint.

Remarks

If there are no characters at the provided x-coordinate, a point in virtual space will be returned. If the provided x-coordinate is to the left of the start of the line, the buffer position of the line's left edge will be returned.

.NET Framework Security

See Also

Reference

ITextViewLine Interface

Microsoft.VisualStudio.Text.Formatting Namespace