This topic has not yet been rated - Rate this topic

ScrollViewer.ScrollToHorizontalOffset Method

May 02, 2013

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

Windows Phone OS 7.1 Windows Phone OS 7.1

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.

Windows Phone OS

Supported in: 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.