Share via


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)

Syntax

'Declaration
Function GetFractionAtBufferPosition ( _
    bufferPosition As SnapshotPoint _
) As Double
double GetFractionAtBufferPosition(
    SnapshotPoint bufferPosition
)
double GetFractionAtBufferPosition(
    SnapshotPoint bufferPosition
)
abstract GetFractionAtBufferPosition : 
        bufferPosition:SnapshotPoint -> float 
function GetFractionAtBufferPosition(
    bufferPosition : SnapshotPoint
) : double

Parameters

Return Value

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

Remarks

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.

.NET Framework Security

See Also

Reference

IVerticalFractionMap Interface

Microsoft.VisualStudio.Text.Editor Namespace