IViewScroller.ScrollViewportHorizontallyByPixels Method
Scrolls the viewport horizontally by the specified distance.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaration
Sub ScrollViewportHorizontallyByPixels ( _
distanceToScroll As Double _
)
void ScrollViewportHorizontallyByPixels(
double distanceToScroll
)
void ScrollViewportHorizontallyByPixels(
double distanceToScroll
)
abstract ScrollViewportHorizontallyByPixels :
distanceToScroll:float -> unit
function ScrollViewportHorizontallyByPixels(
distanceToScroll : double
)
Parameters
distanceToScroll
Type: DoubleThe 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.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | distanceToScroll is NaN. |
Remarks
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)].
.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.