Freigeben über


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: 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.

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

See Also

Reference

IViewScroller Interface

Microsoft.VisualStudio.Text.Editor Namespace