ITextViewLine::GetVirtualBufferPositionFromXCoordinate 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)

VirtualSnapshotPoint GetVirtualBufferPositionFromXCoordinate(
	double xCoordinate
)

Parameters

xCoordinate
Type: System::Double

The x-coordinate of the desired character.

Return Value

Type: Microsoft.VisualStudio.Text::VirtualSnapshotPoint

The text buffer-based point of the character at xCoordinate.

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.

Return to top
Show: