IViewScroller::ScrollViewportHorizontallyByPixels Method (Double)

 

Scrolls the viewport horizontally by the specified distance.

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

void ScrollViewportHorizontallyByPixels(
	double distanceToScroll
)

Parameters

distanceToScroll
Type: System::Double

The distance to scroll the viewport in the text rendering coordinate system. Positive values scroll the viewport to the right, and negative values scroll the viewport to the left.

Exception Condition
ArgumentOutOfRangeException

distanceToScroll is NaN.

A view cannot be scrolled horizontally if word wrap is enabled. If word wrap is disabled, the horizontal offset of the view must be between [0.0, max(0.0, formatted content width - viewport width)].

Return to top
Show: