Поделиться через


ITextRangeProvider.ScrollIntoView Method

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

Causes the text control to scroll vertically until the text range is visible in the viewport.

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

Syntax

'Declaration
Sub ScrollIntoView ( _
    alignToTop As Boolean _
)
void ScrollIntoView(
    bool alignToTop
)

Parameters

  • alignToTop
    Type: System.Boolean
    true if the text control should be scrolled so that the text range is flush with the top of the viewport; false if the text range is flush with the bottom of the viewport.

Remarks

ScrollIntoView can scroll to both hidden and visible text. However, if the text range is hidden, the text control scrolls only if the hidden text has an anchor in the viewport.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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