Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ScrollViewer.ScrollToHorizontalOffset Method

Scrolls the content that is within the ScrollViewer to the specified horizontal offset position.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public void ScrollToHorizontalOffset(
	double offset
)

Parameters

offset
Type: System.Double
The position that the content scrolls to.

The HorizontalOffset property will not be updated until a layout pass has occurred. You can force an update by calling UpdateLayout.

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

In Windows Phone OS 7.1, when you set the content indirectly for the ScrollViewer, such as with a ContentPresenter. You should call UpdateLayout prior to calling ScrollToVerticalOffset or ScrollToHorizontalOffset; otherwise, an exception will occur.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft