다음을 통해 공유


IVerticalFractionMap.GetBufferPositionAtFraction Method

Gets the buffer position that corresponds to a fraction of the vertical extent of the view, if it exists.

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

Syntax

‘선언
Function GetBufferPositionAtFraction ( _
    fraction As Double _
) As SnapshotPoint
SnapshotPoint GetBufferPositionAtFraction(
    double fraction
)
SnapshotPoint GetBufferPositionAtFraction(
    double fraction
)
abstract GetBufferPositionAtFraction : 
        fraction:float -> SnapshotPoint 
function GetBufferPositionAtFraction(
    fraction : double
) : SnapshotPoint

Parameters

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

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotPoint
The corresponding character position.

Exceptions

Exception Condition
ArgumentOutOfRangeException

fraction is NaN, less than 0.0 or greater than 1.0.

Remarks

Different buffer positions can have the same fractions. This method is guaranteed only to be consistent: it will return the same position for the same fraction. 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