Partager via


IViewScroller.ScrollViewportVerticallyByPixels Method

Scrolls the viewport vertically by the specified distance.

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

Syntax

'Déclaration
Sub ScrollViewportVerticallyByPixels ( _
    distanceToScroll As Double _
)
void ScrollViewportVerticallyByPixels(
    double distanceToScroll
)
void ScrollViewportVerticallyByPixels(
    double distanceToScroll
)
abstract ScrollViewportVerticallyByPixels : 
        distanceToScroll:float -> unit 
function ScrollViewportVerticallyByPixels(
    distanceToScroll : double
)

Parameters

  • distanceToScroll
    Type: System.Double
    The distance to scroll in the text rendering coordinate system. Positive values scroll the viewport up, and negative values scroll the viewport down.

Exceptions

Exception Condition
ArgumentOutOfRangeException

distanceToScroll is NaN.

Remarks

This can be very slow for large numbers of pixels. You should avoid using this method to scroll more than the height of the viewport in either direction.The viewport always contains at least one visible line along its top edge, and the distance scrolled will be clipped to ensure that this always remains true.

.NET Framework Security

See Also

Reference

IViewScroller Interface

Microsoft.VisualStudio.Text.Editor Namespace