Bagikan melalui


IScrollProvider.SetScrollPercent Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the horizontal and vertical scroll position as a percentage of the total content area within the control.

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

Syntax

'Declaration
Sub SetScrollPercent ( _
    horizontalPercent As Double, _
    verticalPercent As Double _
)
void SetScrollPercent(
    double horizontalPercent,
    double verticalPercent
)

Parameters

  • horizontalPercent
    Type: System.Double
    The horizontal position as a percentage of the content area's total range. Pass NoScroll if the control cannot be scrolled in this direction.
  • verticalPercent
    Type: System.Double
    The vertical position as a percentage of the content area's total range. Pass NoScroll if the control cannot be scrolled in this direction.

Remarks

This method is useful only when the content area of the control is larger than the visible region.

Passing the value NoScroll indicates that there is no scrolling in the specified direction.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.