Partager via


IViewScroller.ScrollViewportVerticallyByPixels(Double) Method

Definition

Scrolls the viewport vertically by distanceToScroll.

public:
 void ScrollViewportVerticallyByPixels(double distanceToScroll);
public:
 void ScrollViewportVerticallyByPixels(double distanceToScroll);
void ScrollViewportVerticallyByPixels(double distanceToScroll);
public void ScrollViewportVerticallyByPixels (double distanceToScroll);
abstract member ScrollViewportVerticallyByPixels : double -> unit
Public Sub ScrollViewportVerticallyByPixels (distanceToScroll As Double)

Parameters

distanceToScroll
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

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.

Applies to