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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.