ScrollViewer.HorizontalOffset Property

Updated: July 2008

Gets a value that contains the horizontal offset of the scrolled content. This is a dependency property.

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

public double HorizontalOffset { get; }
You cannot set this property in XAML.

Property Value

Type: System.Double
A Double that represents the horizontal offset of the scrolled content. The default is 0.0.

Identifier field

HorizontalOffsetProperty

Metadata properties set to true

None

A positive HorizontalOffset value corresponds to the content being offset to the left.

Valid values are between zero and the ExtentWidth minus the ViewportWidth.

The returned value is described in Device Independent Pixels.

Beginning in the .NET Framework version 3.5 SP1, when IsDeferredScrollingEnabled is true, HorizontalOffset continues to change as the user drags the Thumb, but the content view does not change until the Thumb is released. In this case, ContentHorizontalOffset represents the visible content offset and HorizontalOffset represents the content offset based on the Thumb position.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Date

History

Reason

July 2008

Updated remarks to describe SP1 behavior.

SP1 feature change.

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

Community Additions

ADD
Show:
© 2014 Microsoft