ScrollPattern.Scroll Method (ScrollAmount, ScrollAmount)

 

Scrolls the visible region of the content area horizontally and vertically.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

member Scroll : 
        horizontalAmount:ScrollAmount *
        verticalAmount:ScrollAmount -> unit

Parameters

horizontalAmount
Type: System.Windows.Automation.ScrollAmount

The horizontal increment specific to the control. NoScroll should be passed in if the control cannot be scrolled in this direction.

verticalAmount
Type: System.Windows.Automation.ScrollAmount

The vertical increment specific to the control. NoScroll should be passed in if the control cannot be scrolled in this direction.

Exception Condition
ArgumentException

A control supports SmallIncrement values exclusively for horizontal or vertical scrolling but a LargeIncrement value is passed in.

InvalidOperationException

An attempt is made to scroll in an unsupported direction.

In the following example, a ScrollPatterncontrol pattern is obtained from an AutomationElement and is then used to scroll the element a requested amount either horizontally or vertically.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: