IVerticalFractionMap.GetFractionAtBufferPosition Method

Gets the fraction of the vertical extent of the view that corresponds to the specified buffer position.

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

double GetFractionAtBufferPosition(
	SnapshotPoint bufferPosition
)

Parameters

bufferPosition
Type: Microsoft.VisualStudio.Text.SnapshotPoint

The buffer position.

Return Value

Type: System.Double
The corresponding fraction of the vertical extent of the view.

Different buffer positions can have the same fractions. This method is guaranteed only to be consistent: it will return the same fraction for the same position. The exact character returned depends on the implementation of the fraction map. In general, it is the first character on the line, but this is not guaranteed.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft