ScrollViewer ScrollViewer ScrollViewer ScrollViewer Class

Definition

Represents a scrollable area that can contain other visible elements.

public : sealed class ScrollViewer : ContentControl, IScrollViewer, IScrollViewer2, IScrollViewer3public sealed class ScrollViewer : ContentControl, IScrollViewer, IScrollViewer2, IScrollViewer3Public NotInheritable Class ScrollViewer Inherits ContentControl Implements IScrollViewer, IScrollViewer2, IScrollViewer3// This API is not available in Javascript.
<ScrollViewer .../>
-or-
<ScrollViewer ...>
content
</ScrollViewer>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

Examples

The following XAML creates a large TextBlock inside a ScrollViewer, along with another copy of the TextBlock for comparison.

<StackPanel>
    <!-- A large TextBlock. -->
    <TextBlock Width="300" TextWrapping="Wrap" Margin="0,0,0,30" 
      Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac mi ipsum. Phasellus vel malesuada mauris. Donec pharetra, enim sit amet mattis tincidunt, felis nisi semper lectus, vel porta diam nisi in augue. Pellentesque lacus tortor, aliquam et faucibus id, rhoncus ut justo. Sed id lectus odio, eget pulvinar diam. Suspendisse eleifend ornare libero, in luctus purus aliquet non. Sed interdum, sem vitae rutrum rhoncus, felis ligula ultrices sem, in eleifend eros ante id neque." />
    
    <!-- The same large TextBlock, wrapped in a ScrollViewer. -->
    <ScrollViewer Height="200" Width="200" 
                  HorizontalScrollBarVisibility="Auto" 
                  VerticalScrollBarVisibility="Auto">
        <TextBlock Width="300" TextWrapping="Wrap"
            Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac mi ipsum. Phasellus vel malesuada mauris. Donec pharetra, enim sit amet mattis tincidunt, felis nisi semper lectus, vel porta diam nisi in augue. Pellentesque lacus tortor, aliquam et faucibus id, rhoncus ut justo. Sed id lectus odio, eget pulvinar diam. Suspendisse eleifend ornare libero, in luctus purus aliquet non. Sed interdum, sem vitae rutrum rhoncus, felis ligula ultrices sem, in eleifend eros ante id neque." />
    </ScrollViewer>
</StackPanel>

Remarks

ScrollViewer is a container control that lets the user pan and zoom its content.

Scroll viewer control

A ScrollViewer enables content to be displayed in a smaller area than its actual size. When the content of the ScrollViewer is not entirely visible, the ScrollViewer displays scrollbars that the user can use to move the content areas that is visible. The area that includes all of the content of the ScrollViewer is the extent. The visible area of the content is the viewport.

It's typical for a ScrollViewer control to exist as a composite part of other controls. A ScrollViewer part along with the ScrollContentPresenter class for support will display a viewport along with scrollbars only when the host control's layout space is being constrained smaller than the expanded content size. This is often the case for lists, so ListView and GridView templates always include a ScrollViewer. TextBox and RichEditBox also include a ScrollViewer in their templates.

When a ScrollViewer part in a control exists, the host control often has built-in event handling for certain input events and manipulations that enable the content to scroll. For example, a GridView interprets a swipe gesture and this causes the content to scroll horizontally. The input events and raw manipulations that the host control receives are considered handled by the control, and lower-level events such as PointerPressed won't be raised and won't bubble to any parent containers either. You can change some of the built-in control handling by overriding a control class and the On* virtual methods for events, or by retemplating the control. But in either case it's not trivial to reproduce the original default behavior, which is typically there so that the control reacts in expected ways to events and to a user's input actions and gestures. So you should consider whether you really need that input event to fire. You might want to investigate whether there are other input events or gestures that are not being control-handled, and use those in your app or control interaction design.

To make it possible for controls that include a ScrollViewer to influence some of the behavior and properties that are from within the ScrollViewer part, ScrollViewer defines a number of XAML attached properties that can be set in styles and used in template bindings.

Pen interaction

Prerelease. Fall Creators Update (Windows 10 Insider Preview Build 16215 and later) - Behavior change

By default, instead of text selection, an active pen now scrolls/pans in UWP apps (just like touch, touchpad, and passive pen). The ScrollViewer consumes pointer events unless you specify that you want to handle the events yourself, and don't want them to be used for manipulation.

If your app depends on the previous behavior, you can override pen scrolling and revert to the previous behavior. To do this, handle the PointerPressed event and set the ManipulationMode property to specify that the system should not handle pen interaction to scroll your main ScrollViewer. You also handle the PointerReleased and PointerCanceled events to turn the default system behavior back on when the Pen is removed.

This example shows how to:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <ScrollViewer x:Name="myScrollViewer">
        <Image Source="Assets/StoreLogo.png"/>
    </ScrollViewer>
</Grid>
public MainPage()
{
    this.InitializeComponent();

    this.myScrollViewer.AddHandler(UIElement.PointerPressedEvent, 
        new PointerEventHandler(myScrollViewer_PointerPressed), 
        true /*handledEventsToo*/);
    this.myScrollViewer.AddHandler(UIElement.PointerReleasedEvent, 
        new PointerEventHandler(myScrollViewer_PointerReleased), 
        true /*handledEventsToo*/);
    this.myScrollViewer.AddHandler(UIElement.PointerCanceledEvent, 
        new PointerEventHandler(myScrollViewer_PointerCanceled), 
        true /*handledEventsToo*/);
}

private void myScrollViewer_PointerPressed(object sender, PointerRoutedEventArgs e)
{
    if (e.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Pen)
    {
        (myScrollViewer.Content as UIElement).ManipulationMode &= ~ManipulationModes.System;
    }
}

private void myScrollViewer_PointerReleased(object sender, PointerRoutedEventArgs e)
{
    if (e.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Pen)
    {
        (myScrollViewer.Content as UIElement).ManipulationMode |= ManipulationModes.System;
    }
}

private void myScrollViewer_PointerCanceled(object sender, PointerRoutedEventArgs e)
{
    if (e.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Pen)
    {
        (myScrollViewer.Content as UIElement).ManipulationMode |= ManipulationModes.System;
    }
}

ScrollViewer XAML attached properties

ScrollViewer defines the following XAML attached properties:

In order to support XAML processor access to the attached properties, and also to expose equivalent get and set operations to code, each XAML attached property has a pair of Get and Set accessor methods. For example, the GetHorizontalScrollMode and SetHorizontalScrollMode methods support and provide the equivalent code-only support for ScrollViewer.HorizontalScrollMode. Alternatively, you can use the dependency property system to get or set the value of the attached property. Call GetValue or SetValue, passing the arguments of the dependency property identifier to set, and a reference to the target object on which to get or set the value.

Control style and template

You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP&lt;SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.

Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.

This table shows the resources used by the ScrollViewer control.

Resource keyDescription
ScrollViewerScrollBarSeparatorBackgroundBackground color of the scrollbar separator

Windows 8 behavior

Gesture handling by track pad devices

For Windows 8, track pad device gestures that were input-handled by a ScrollViewer control part were interpreted as mouse wheel input, and thus would fire a PointerWheelChanged event. Starting with Windows 8.1, ScrollViewer uses an underlying manipulation logic that interprets track pad gestures as actions that the ScrollViewer responds to, and thus the gesture is considered handled by the control and the PointerWheelChanged event is not fired anymore.

If you migrate your app code from Windows 8 to Windows 8.1 you may want to account for this behavior change, because it results in PointerWheelChanged being fired in fewer cases. Also, the behavior that's now built-in to ScrollViewer may be duplicating what your handler would have done.

Apps that were compiled for Windows 8 but running on Windows 8.1 continue to use the Windows 8 behavior.

App UI for On-Screen Keyboard

Windows 8 had an internally implemented logic that would associate a ScrollViewer with the overall app UI whenever the user invokes the On-Screen Keyboard. This On-Screen Keyboard is a specific accessibility feature that users request through the Ease of Access Center. It's not the same as the soft keyboard that can appear in app UI for text input controls, if the system detects no keyboard device. What the internal ScrollViewer does here is to make it possible to scroll the area where the app is, if scrolling it is forced because the keyboard is taking UI space.

Starting with Windows 8.1, the system still has UI/layout behavior when the On-Screen Keyboard appears, but it no longer uses this internally created ScrollViewer. Instead it uses a dedicated internal control that app code can't change or inspect.

Most aspects of this behavior change don't affect apps at all. However, your app might have anticipated this behavior, by providing an implicit Style for ScrollViewer that's meant to change the layout, or by walking the tree with VisualTreeHelper to find this internally created ScrollViewer and alter it at run-time. For an app that is compiled for Windows 8.1 that code won't be useful.

Apps that were compiled for Windows 8 but running on Windows 8.1 continue to use the Windows 8 behavior.

Constructors

ScrollViewer() ScrollViewer() ScrollViewer() ScrollViewer()

Initializes a new instance of the ScrollViewer class.

public : ScrollViewer()public ScrollViewer()Public Sub New()// This API is not available in Javascript.

Properties

BringIntoViewOnFocusChange BringIntoViewOnFocusChange BringIntoViewOnFocusChange BringIntoViewOnFocusChange

Gets or sets a value that determines whether the ScrollViewer uses a bring-into-view scroll behavior when an item in the view gets focus.

public : PlatForm::Boolean BringIntoViewOnFocusChange { get; set; }public bool BringIntoViewOnFocusChange { get; set; }Public ReadWrite Property BringIntoViewOnFocusChange As bool// This API is not available in Javascript.
<ScrollViewer BringIntoViewOnFocusChange="bool" />
-or-
<object ScrollViewer.BringIntoViewOnFocusChange="bool"/>
Value
PlatForm::Boolean bool bool bool

true to use a behavior that brings focused items into view. false to use a behavior that focused items do not automatically scroll into view. The default is true.

Remarks

For XAML usage, BringIntoViewOnFocusChange can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.BringIntoViewOnFocusChange attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

BringIntoViewOnFocusChangeProperty BringIntoViewOnFocusChangeProperty BringIntoViewOnFocusChangeProperty BringIntoViewOnFocusChangeProperty

Identifies the BringIntoViewOnFocusChange dependency property.

public : static DependencyProperty BringIntoViewOnFocusChangeProperty { get; }public static DependencyProperty BringIntoViewOnFocusChangeProperty { get; }Public Static ReadOnly Property BringIntoViewOnFocusChangeProperty As DependencyProperty// This API is not available in Javascript.

ComputedHorizontalScrollBarVisibility ComputedHorizontalScrollBarVisibility ComputedHorizontalScrollBarVisibility ComputedHorizontalScrollBarVisibility

Gets a value that indicates whether the horizontal ScrollBar is visible.

public : Visibility ComputedHorizontalScrollBarVisibility { get; }public Visibility ComputedHorizontalScrollBarVisibility { get; }Public ReadOnly Property ComputedHorizontalScrollBarVisibility As Visibility// This API is not available in Javascript.
Value
Visibility Visibility Visibility Visibility

A Visibility that indicates whether the horizontal scroll bar is visible. The default value is Hidden.

ComputedHorizontalScrollBarVisibilityProperty ComputedHorizontalScrollBarVisibilityProperty ComputedHorizontalScrollBarVisibilityProperty ComputedHorizontalScrollBarVisibilityProperty

Identifies the ComputedHorizontalScrollBarVisibility dependency property.

public : static DependencyProperty ComputedHorizontalScrollBarVisibilityProperty { get; }public static DependencyProperty ComputedHorizontalScrollBarVisibilityProperty { get; }Public Static ReadOnly Property ComputedHorizontalScrollBarVisibilityProperty As DependencyProperty// This API is not available in Javascript.

ComputedVerticalScrollBarVisibility ComputedVerticalScrollBarVisibility ComputedVerticalScrollBarVisibility ComputedVerticalScrollBarVisibility

Gets a value that indicates whether the vertical ScrollBar is visible.

public : Visibility ComputedVerticalScrollBarVisibility { get; }public Visibility ComputedVerticalScrollBarVisibility { get; }Public ReadOnly Property ComputedVerticalScrollBarVisibility As Visibility// This API is not available in Javascript.
Value
Visibility Visibility Visibility Visibility

A Visibility that indicates whether the vertical scroll bar is visible. The default value is Visible.

ComputedVerticalScrollBarVisibilityProperty ComputedVerticalScrollBarVisibilityProperty ComputedVerticalScrollBarVisibilityProperty ComputedVerticalScrollBarVisibilityProperty

Identifies the ComputedVerticalScrollBarVisibility dependency property.

public : static DependencyProperty ComputedVerticalScrollBarVisibilityProperty { get; }public static DependencyProperty ComputedVerticalScrollBarVisibilityProperty { get; }Public Static ReadOnly Property ComputedVerticalScrollBarVisibilityProperty As DependencyProperty// This API is not available in Javascript.

ExtentHeight ExtentHeight ExtentHeight ExtentHeight

Gets the vertical size of all the scrollable content in the ScrollViewer.

public : double ExtentHeight { get; }public double ExtentHeight { get; }Public ReadOnly Property ExtentHeight As double// This API is not available in Javascript.
Value
double double double double

The vertical size of all the scrollable content in the ScrollViewer.

Remarks

The extent includes all the content in the ScrollViewer, whether visible or not. The viewport is the visible area of the content.

See Also

ExtentHeightProperty ExtentHeightProperty ExtentHeightProperty ExtentHeightProperty

Identifier for the ExtentHeight dependency property.

public : static DependencyProperty ExtentHeightProperty { get; }public static DependencyProperty ExtentHeightProperty { get; }Public Static ReadOnly Property ExtentHeightProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ExtentHeight dependency property.

ExtentWidth ExtentWidth ExtentWidth ExtentWidth

Gets the horizontal size of all the scrollable content in the ScrollViewer.

public : double ExtentWidth { get; }public double ExtentWidth { get; }Public ReadOnly Property ExtentWidth As double// This API is not available in Javascript.
Value
double double double double

The horizontal size of all the scrollable content in the ScrollViewer.

Remarks

The extent includes all the content in the ScrollViewer, whether visible or not. The viewport is the visible area of the content.

See Also

ExtentWidthProperty ExtentWidthProperty ExtentWidthProperty ExtentWidthProperty

Identifier for the ExtentWidth dependency property.

public : static DependencyProperty ExtentWidthProperty { get; }public static DependencyProperty ExtentWidthProperty { get; }Public Static ReadOnly Property ExtentWidthProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ExtentWidth dependency property.

HorizontalOffset HorizontalOffset HorizontalOffset HorizontalOffset

Gets the distance the content has been scrolled horizontally.

public : double HorizontalOffset { get; }public double HorizontalOffset { get; }Public ReadOnly Property HorizontalOffset As double// This API is not available in Javascript.
Value
double double double double

The distance the content has been scrolled horizontally.

See Also

HorizontalOffsetProperty HorizontalOffsetProperty HorizontalOffsetProperty HorizontalOffsetProperty

Identifies the HorizontalOffset dependency property.

public : static DependencyProperty HorizontalOffsetProperty { get; }public static DependencyProperty HorizontalOffsetProperty { get; }Public Static ReadOnly Property HorizontalOffsetProperty As DependencyProperty// This API is not available in Javascript.

HorizontalScrollBarVisibility HorizontalScrollBarVisibility HorizontalScrollBarVisibility HorizontalScrollBarVisibility

Gets or sets a value that indicates whether a horizontal ScrollBar should be displayed.

public : ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }Public ReadWrite Property HorizontalScrollBarVisibility As ScrollBarVisibility// This API is not available in Javascript.
<ScrollViewer HorizontalScrollBarVisibility="scrollBarVisibilityMemberName"/>
-or-
<object ScrollViewer.HorizontalScrollBarVisibility="scrollBarVisibilityMemberName"/>
Value
ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility

A ScrollBarVisibility value that indicates whether a horizontal ScrollBar should be displayed. The default value is Disabled.

Remarks

For XAML usage, HorizontalScrollBarVisibility can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.HorizontalScrollBarVisibility attached property usage on an element that is a child of a control that supports scrollview implicitly in its template. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

HorizontalScrollBarVisibilityProperty HorizontalScrollBarVisibilityProperty HorizontalScrollBarVisibilityProperty HorizontalScrollBarVisibilityProperty

Identifies the HorizontalScrollBarVisibility dependency property.

public : static DependencyProperty HorizontalScrollBarVisibilityProperty { get; }public static DependencyProperty HorizontalScrollBarVisibilityProperty { get; }Public Static ReadOnly Property HorizontalScrollBarVisibilityProperty As DependencyProperty// This API is not available in Javascript.

HorizontalScrollMode HorizontalScrollMode HorizontalScrollMode HorizontalScrollMode

Gets or sets a value that determines how manipulation input influences scrolling behavior on the horizontal axis.

public : ScrollMode HorizontalScrollMode { get; set; }public ScrollMode HorizontalScrollMode { get; set; }Public ReadWrite Property HorizontalScrollMode As ScrollMode// This API is not available in Javascript.
<ScrollViewer HorizontalScrollMode="scrollModeMemberName" />
-or-
<object ScrollViewer.HorizontalScrollMode="scrollModeMemberName"/>
Value
ScrollMode ScrollMode ScrollMode ScrollMode

A value of the enumeration. The typical default (as set through the default template, not class initialization) is Enabled.

Remarks

Scrolling behavior can also be set through a ScrollViewer.HorizontalScrollMode XAML attached property usage, or by calling SetHorizontalScrollMode. This is for cases where the ScrollViewer is implicit, such as when the ScrollViewer exists in the default template for a GridView, and you want to be able to influence the scrolling behavior without accessing template parts. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

HorizontalScrollModeProperty HorizontalScrollModeProperty HorizontalScrollModeProperty HorizontalScrollModeProperty

Identifies the HorizontalScrollMode dependency property.

public : static DependencyProperty HorizontalScrollModeProperty { get; }public static DependencyProperty HorizontalScrollModeProperty { get; }Public Static ReadOnly Property HorizontalScrollModeProperty As DependencyProperty// This API is not available in Javascript.

HorizontalSnapPointsAlignment HorizontalSnapPointsAlignment HorizontalSnapPointsAlignment HorizontalSnapPointsAlignment

Gets or sets a value that indicates how the existing snap points are horizontally aligned versus the initial viewport.

public : SnapPointsAlignment HorizontalSnapPointsAlignment { get; set; }public SnapPointsAlignment HorizontalSnapPointsAlignment { get; set; }Public ReadWrite Property HorizontalSnapPointsAlignment As SnapPointsAlignment// This API is not available in Javascript.
<ScrollViewer HorizontalSnapPointsAlignment="snapPointsAlignmentMemberName" />

HorizontalSnapPointsAlignmentProperty HorizontalSnapPointsAlignmentProperty HorizontalSnapPointsAlignmentProperty HorizontalSnapPointsAlignmentProperty

Identifies the HorizontalSnapPointsAlignment dependency property.

public : static DependencyProperty HorizontalSnapPointsAlignmentProperty { get; }public static DependencyProperty HorizontalSnapPointsAlignmentProperty { get; }Public Static ReadOnly Property HorizontalSnapPointsAlignmentProperty As DependencyProperty// This API is not available in Javascript.

HorizontalSnapPointsType HorizontalSnapPointsType HorizontalSnapPointsType HorizontalSnapPointsType

Gets or sets a value that declares how manipulation behavior reacts to the snap points along the horizontal axis.

public : SnapPointsType HorizontalSnapPointsType { get; set; }public SnapPointsType HorizontalSnapPointsType { get; set; }Public ReadWrite Property HorizontalSnapPointsType As SnapPointsType// This API is not available in Javascript.
<ScrollViewer HorizontalSnapPointsType="snapPointsTypeMemberName" />
Value
SnapPointsType SnapPointsType SnapPointsType SnapPointsType

A value of the enumeration. The default is None but might be set through a control template.

Examples

This XAML is from the default template for a Hub control. A Hub has a ScrollViewer part that surrounds an ItemsStackPanel for its content. Hub uses the Optional value for its snapping behavior in both dimensions (although VerticalScrollMode is disabled in starting visual states) and disables ZoomMode. Note how the SnapPointsAlignment properties are also set as attributes here.


<ControlTemplate TargetType="Hub">
...
<ScrollViewer x:Name="ScrollViewer"
    Grid.RowSpan="2"
    HorizontalScrollMode="Auto"
    HorizontalScrollBarVisibility="Auto"
    VerticalScrollMode="Disabled"
    VerticalScrollBarVisibility="Disabled"
    HorizontalSnapPointsAlignment="Near"
    HorizontalSnapPointsType="Optional"
    VerticalSnapPointsAlignment="Near"
    VerticalSnapPointsType="Optional"
    ZoomMode="Disabled">
  <ItemsStackPanel x:Name="Panel" 
       Orientation="{TemplateBinding Orientation}"
       CacheLength="20" />
</ScrollViewer>
...
</ControlTemplate>

Remarks

For panning actions, there are often natural stopping places. Snap points provide a way to indicate where these places are. Then, when a user swipes, the manipulation result favors that natural point using behavior as expressed by a SnapPointsType value.

Proximity points (Optional** and *OptionalSingle*): ** When a user is going to naturally stop the manipulation in the proximity of a snap point, proximity points help the user land at the natural stopping place. Because the user has to land in proximity to the snap point to cause it to stop there, the user will sometimes have to perform another swipe to reach a snap point.

Mandatory snap points (Mandatory** and *MandatorySingle*): ** In contrast to proximity, mandatory snap points ensure that the content is adjusted to always land on a snap point. Even if the user releases the manipulation halfway between two snap-points, it will always move to one of the snap points.

To see the effects of snap points on ScrollViewer behavior yourself, get the XAML scrolling, panning and zooming sample. Run the sample on a touch device (not the simulator). Try out the SnapPointsType values when you view the "Panning with snap-points" example page of the sample.

To learn more about the swipe gesture and panning, see the "Panning behaviors" section of Guidelines for panning.

The default value of None is the default of the enumeration. If it's set, this property is often set as an attribute in a XAML template part, or as a style Setter. Each control potentially sets this differently. Getting the value at run time will provide the value that came from applied styles and templates.

See Also

HorizontalSnapPointsTypeProperty HorizontalSnapPointsTypeProperty HorizontalSnapPointsTypeProperty HorizontalSnapPointsTypeProperty

Identifies the HorizontalSnapPointsType dependency property.

public : static DependencyProperty HorizontalSnapPointsTypeProperty { get; }public static DependencyProperty HorizontalSnapPointsTypeProperty { get; }Public Static ReadOnly Property HorizontalSnapPointsTypeProperty As DependencyProperty// This API is not available in Javascript.

IsDeferredScrollingEnabled IsDeferredScrollingEnabled IsDeferredScrollingEnabled IsDeferredScrollingEnabled

Gets or sets a value that determines the deferred scrolling behavior for a ScrollViewer.

public : PlatForm::Boolean IsDeferredScrollingEnabled { get; set; }public bool IsDeferredScrollingEnabled { get; set; }Public ReadWrite Property IsDeferredScrollingEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsDeferredScrollingEnabled="bool" />
-or-
<object ScrollViewer.IsDeferredScrollingEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

true if deferred scrolling should occur; otherwise, false.

Remarks

Deferred scrolling behavior means that the view does not scroll until a user action is completed. For example, if a region scrolls when the user manipulates a thumb control, and IsDeferredScrollingEnabled is true, the scroll does not occur until the touch point on the thumb is released. In contrast, if IsDeferredScrollingEnabled is false, the region scrolls any time that the touch point selection point along the slider track is moved.

For XAML usage, IsDeferredScrollingEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsDeferredScrollingEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsDeferredScrollingEnabledProperty IsDeferredScrollingEnabledProperty IsDeferredScrollingEnabledProperty IsDeferredScrollingEnabledProperty

Identifies the IsDeferredScrollingEnabled dependency property.

public : static DependencyProperty IsDeferredScrollingEnabledProperty { get; }public static DependencyProperty IsDeferredScrollingEnabledProperty { get; }Public Static ReadOnly Property IsDeferredScrollingEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsHorizontalRailEnabled IsHorizontalRailEnabled IsHorizontalRailEnabled IsHorizontalRailEnabled

Gets or sets a value that indicates whether the scroll rail is enabled for the horizontal axis.

public : PlatForm::Boolean IsHorizontalRailEnabled { get; set; }public bool IsHorizontalRailEnabled { get; set; }Public ReadWrite Property IsHorizontalRailEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsHorizontalRailEnabled="bool" />
-or-
<object ScrollViewer.IsHorizontalRailEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

True to enable the horizontal scroll rail; otherwise, false. The default is true.

IsHorizontalRailEnabledProperty IsHorizontalRailEnabledProperty IsHorizontalRailEnabledProperty IsHorizontalRailEnabledProperty

Identifies the IsHorizontalRailEnabled dependency property.

public : static DependencyProperty IsHorizontalRailEnabledProperty { get; }public static DependencyProperty IsHorizontalRailEnabledProperty { get; }Public Static ReadOnly Property IsHorizontalRailEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsHorizontalScrollChainingEnabled IsHorizontalScrollChainingEnabled IsHorizontalScrollChainingEnabled IsHorizontalScrollChainingEnabled

Gets or sets a value that indicates whether scroll chaining is enabled from this child to its parent, for the horizontal axis.

public : PlatForm::Boolean IsHorizontalScrollChainingEnabled { get; set; }public bool IsHorizontalScrollChainingEnabled { get; set; }Public ReadWrite Property IsHorizontalScrollChainingEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsHorizontalScrollChainingEnabled="bool" />
-or-
<object ScrollViewer.IsHorizontalScrollChainingEnabled="bool"/>

Value
PlatForm::Boolean bool bool bool

true to enable horizontal scroll chaining from child to parent; otherwise, false.

Remarks

For XAML usage, IsHorizontalScrollChainingEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsHorizontalScrollChainingEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsHorizontalScrollChainingEnabledProperty IsHorizontalScrollChainingEnabledProperty IsHorizontalScrollChainingEnabledProperty IsHorizontalScrollChainingEnabledProperty

Identifies the IsHorizontalScrollChainingEnabled dependency property.

public : static DependencyProperty IsHorizontalScrollChainingEnabledProperty { get; }public static DependencyProperty IsHorizontalScrollChainingEnabledProperty { get; }Public Static ReadOnly Property IsHorizontalScrollChainingEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsScrollInertiaEnabled IsScrollInertiaEnabled IsScrollInertiaEnabled IsScrollInertiaEnabled

Gets or sets a value that indicates whether scroll actions should include inertia in their behavior and value.

public : PlatForm::Boolean IsScrollInertiaEnabled { get; set; }public bool IsScrollInertiaEnabled { get; set; }Public ReadWrite Property IsScrollInertiaEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsScrollInertiaEnabled="bool" />
-or-
<object ScrollViewer.IsScrollInertiaEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

true if scroll actions should include inertia in their behavior and value; otherwise, false.

Remarks

For XAML usage, IsScrollInertiaEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsScrollInertiaEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsScrollInertiaEnabledProperty IsScrollInertiaEnabledProperty IsScrollInertiaEnabledProperty IsScrollInertiaEnabledProperty

Identifies the IsScrollInertiaEnabled dependency property.

public : static DependencyProperty IsScrollInertiaEnabledProperty { get; }public static DependencyProperty IsScrollInertiaEnabledProperty { get; }Public Static ReadOnly Property IsScrollInertiaEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsVerticalRailEnabled IsVerticalRailEnabled IsVerticalRailEnabled IsVerticalRailEnabled

Gets or sets a value that indicates whether the scroll rail is enabled for the vertical axis.

public : PlatForm::Boolean IsVerticalRailEnabled { get; set; }public bool IsVerticalRailEnabled { get; set; }Public ReadWrite Property IsVerticalRailEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsVerticalRailEnabled="bool" />
-or-
<object ScrollViewer.IsVerticalRailEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

True to enable the vertical scroll rail; otherwise, false. The default is true.

IsVerticalRailEnabledProperty IsVerticalRailEnabledProperty IsVerticalRailEnabledProperty IsVerticalRailEnabledProperty

Identifies the IsVerticalRailEnabled dependency property.

public : static DependencyProperty IsVerticalRailEnabledProperty { get; }public static DependencyProperty IsVerticalRailEnabledProperty { get; }Public Static ReadOnly Property IsVerticalRailEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsVerticalScrollChainingEnabled IsVerticalScrollChainingEnabled IsVerticalScrollChainingEnabled IsVerticalScrollChainingEnabled

Gets or sets a value that indicates whether scroll chaining is enabled from this child to its parent, for the vertical axis.

public : PlatForm::Boolean IsVerticalScrollChainingEnabled { get; set; }public bool IsVerticalScrollChainingEnabled { get; set; }Public ReadWrite Property IsVerticalScrollChainingEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsVerticalScrollChainingEnabled="bool" />
-or-
<object ScrollViewer.IsVerticalScrollChainingEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

true to enable vertical scroll chaining from child to parent; otherwise, false.

Remarks

For XAML usage, IsVerticalScrollChainingEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsVerticalScrollChainingEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsVerticalScrollChainingEnabledProperty IsVerticalScrollChainingEnabledProperty IsVerticalScrollChainingEnabledProperty IsVerticalScrollChainingEnabledProperty

Identifies the IsVerticalScrollChainingEnabled dependency property.

public : static DependencyProperty IsVerticalScrollChainingEnabledProperty { get; }public static DependencyProperty IsVerticalScrollChainingEnabledProperty { get; }Public Static ReadOnly Property IsVerticalScrollChainingEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsZoomChainingEnabled IsZoomChainingEnabled IsZoomChainingEnabled IsZoomChainingEnabled

Gets or sets a value that indicates whether zoom chaining is enabled from this child to its parent.

public : PlatForm::Boolean IsZoomChainingEnabled { get; set; }public bool IsZoomChainingEnabled { get; set; }Public ReadWrite Property IsZoomChainingEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsZoomChainingEnabled="bool" />
-or-
<object ScrollViewer.IsZoomChainingEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

true to enable zoom chaining from child to parent; otherwise, false.

Remarks

For XAML usage, IsZoomChainingEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsZoomChainingEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsZoomChainingEnabledProperty IsZoomChainingEnabledProperty IsZoomChainingEnabledProperty IsZoomChainingEnabledProperty

Identifies the IsZoomChainingEnabled dependency property.

public : static DependencyProperty IsZoomChainingEnabledProperty { get; }public static DependencyProperty IsZoomChainingEnabledProperty { get; }Public Static ReadOnly Property IsZoomChainingEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsZoomInertiaEnabled IsZoomInertiaEnabled IsZoomInertiaEnabled IsZoomInertiaEnabled

Gets or sets a value that indicates whether zoom actions should include inertia in their behavior and value.

public : PlatForm::Boolean IsZoomInertiaEnabled { get; set; }public bool IsZoomInertiaEnabled { get; set; }Public ReadWrite Property IsZoomInertiaEnabled As bool// This API is not available in Javascript.
<ScrollViewer IsZoomInertiaEnabled="bool" />
-or-
<object ScrollViewer.IsZoomInertiaEnabled="bool"/>
Value
PlatForm::Boolean bool bool bool

true if zoom actions should include inertia in their behavior and value; otherwise, false.

Remarks

For XAML usage, IsZoomInertiaEnabled can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.IsZoomInertiaEnabled attached property usage on an element that is a child of a control that supports scrollview implicitly in its template.

IsZoomInertiaEnabledProperty IsZoomInertiaEnabledProperty IsZoomInertiaEnabledProperty IsZoomInertiaEnabledProperty

Identifies the IsZoomInertiaEnabled dependency property.

public : static DependencyProperty IsZoomInertiaEnabledProperty { get; }public static DependencyProperty IsZoomInertiaEnabledProperty { get; }Public Static ReadOnly Property IsZoomInertiaEnabledProperty As DependencyProperty// This API is not available in Javascript.

LeftHeader LeftHeader LeftHeader LeftHeader

Gets or sets the content of the left header.

public : UIElement LeftHeader { get; set; }public UIElement LeftHeader { get; set; }Public ReadWrite Property LeftHeader As UIElement// This API is not available in Javascript.
<ScrollViewer>
  <ScrollViewer.LeftHeader>headerObject</ScrollViewer.LeftHeader>
</ScrollViewer>

Value
UIElement UIElement UIElement UIElement

The content of the left header.

Remarks

The LeftHeader, TopHeader, and TopLeftHeader properties can be set only when ScrollViewer content's HorizontalAlignment is Left and VerticalAlignment is Top.

The left header scrolls vertically, but not horizontally.

See Also

LeftHeaderProperty LeftHeaderProperty LeftHeaderProperty LeftHeaderProperty

Identifies the LeftHeader dependency property.

public : static DependencyProperty LeftHeaderProperty { get; }public static DependencyProperty LeftHeaderProperty { get; }Public Static ReadOnly Property LeftHeaderProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the LeftHeader dependency property.

MaxZoomFactor MaxZoomFactor MaxZoomFactor MaxZoomFactor

Gets or sets a value that indicates the maximum permitted run-time value of ZoomFactor.

public : float MaxZoomFactor { get; set; }public float MaxZoomFactor { get; set; }Public ReadWrite Property MaxZoomFactor As float// This API is not available in Javascript.
<ScrollViewer MaxZoomFactor="single" />
Value
float float float float

The maximum permitted run-time value of ZoomFactor. The default is 10.

MaxZoomFactorProperty MaxZoomFactorProperty MaxZoomFactorProperty MaxZoomFactorProperty

Identifies the MaxZoomFactor dependency property.

public : static DependencyProperty MaxZoomFactorProperty { get; }public static DependencyProperty MaxZoomFactorProperty { get; }Public Static ReadOnly Property MaxZoomFactorProperty As DependencyProperty// This API is not available in Javascript.

MinZoomFactor MinZoomFactor MinZoomFactor MinZoomFactor

Gets or sets a value that indicates the minimum permitted run-time value of ZoomFactor.

public : float MinZoomFactor { get; set; }public float MinZoomFactor { get; set; }Public ReadWrite Property MinZoomFactor As float// This API is not available in Javascript.
<ScrollViewer MinZoomFactor="single" />
Value
float float float float

The minimum permitted run-time value of ZoomFactor. The default is 0.1.

MinZoomFactorProperty MinZoomFactorProperty MinZoomFactorProperty MinZoomFactorProperty

Identifies the MinZoomFactor dependency property.

public : static DependencyProperty MinZoomFactorProperty { get; }public static DependencyProperty MinZoomFactorProperty { get; }Public Static ReadOnly Property MinZoomFactorProperty As DependencyProperty// This API is not available in Javascript.

ScrollableHeight ScrollableHeight ScrollableHeight ScrollableHeight

Gets a value that represents the vertical size of the area that can be scrolled; the difference between the height of the extent and the height of the viewport.

public : double ScrollableHeight { get; }public double ScrollableHeight { get; }Public ReadOnly Property ScrollableHeight As double// This API is not available in Javascript.
Value
double double double double

The vertical size of the area that can be scrolled. This property has no default value.

ScrollableHeightProperty ScrollableHeightProperty ScrollableHeightProperty ScrollableHeightProperty

Identifies the ScrollableHeight dependency property.

public : static DependencyProperty ScrollableHeightProperty { get; }public static DependencyProperty ScrollableHeightProperty { get; }Public Static ReadOnly Property ScrollableHeightProperty As DependencyProperty// This API is not available in Javascript.

ScrollableWidth ScrollableWidth ScrollableWidth ScrollableWidth

Gets a value that represents the horizontal size of the area that can be scrolled; the difference between the width of the extent and the width of the viewport.

public : double ScrollableWidth { get; }public double ScrollableWidth { get; }Public ReadOnly Property ScrollableWidth As double// This API is not available in Javascript.
Value
double double double double

The horizontal size of the area that can be scrolled. This property has no default value.

ScrollableWidthProperty ScrollableWidthProperty ScrollableWidthProperty ScrollableWidthProperty

Identifies the ScrollableWidth dependency property.

public : static DependencyProperty ScrollableWidthProperty { get; }public static DependencyProperty ScrollableWidthProperty { get; }Public Static ReadOnly Property ScrollableWidthProperty As DependencyProperty// This API is not available in Javascript.

TopHeader TopHeader TopHeader TopHeader

Gets or sets the content of the top header.

public : UIElement TopHeader { get; set; }public UIElement TopHeader { get; set; }Public ReadWrite Property TopHeader As UIElement// This API is not available in Javascript.
<ScrollViewer>
  <ScrollViewer.TopHeader>headerObject</ScrollViewer.TopHeader>
</ScrollViewer>

Value
UIElement UIElement UIElement UIElement

The content of the top header.

Remarks

The LeftHeader, TopHeader, and TopLeftHeader properties can be set only when ScrollViewer content's HorizontalAlignment is Left and VerticalAlignment is Top.

The top header scrolls horizontally, but not vertically.

TopHeaderProperty TopHeaderProperty TopHeaderProperty TopHeaderProperty

Identifies the TopHeader dependency property.

public : static DependencyProperty TopHeaderProperty { get; }public static DependencyProperty TopHeaderProperty { get; }Public Static ReadOnly Property TopHeaderProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the TopHeader dependency property.

TopLeftHeader TopLeftHeader TopLeftHeader TopLeftHeader

Gets or sets the content of the top, left header.

public : UIElement TopLeftHeader { get; set; }public UIElement TopLeftHeader { get; set; }Public ReadWrite Property TopLeftHeader As UIElement// This API is not available in Javascript.
<ScrollViewer>
  <ScrollViewer.TopLeftHeader>headerObject</ScrollViewer.TopLeftHeader>
</ScrollViewer>

Value
UIElement UIElement UIElement UIElement

The content of the top, left header.

Remarks

The LeftHeader, TopHeader, and TopLeftHeader properties can be set only when ScrollViewer content's HorizontalAlignment is Left and VerticalAlignment is Top.

The top left header doesn't scroll in any direction.

TopLeftHeaderProperty TopLeftHeaderProperty TopLeftHeaderProperty TopLeftHeaderProperty

Identifies the TopLeftHeader dependency property.

public : static DependencyProperty TopLeftHeaderProperty { get; }public static DependencyProperty TopLeftHeaderProperty { get; }Public Static ReadOnly Property TopLeftHeaderProperty As DependencyProperty// This API is not available in Javascript.

VerticalOffset VerticalOffset VerticalOffset VerticalOffset

Gets the distance the content has been scrolled vertically.

public : double VerticalOffset { get; }public double VerticalOffset { get; }Public ReadOnly Property VerticalOffset As double// This API is not available in Javascript.
Value
double double double double

The distance the content has been scrolled vertically.

See Also

VerticalOffsetProperty VerticalOffsetProperty VerticalOffsetProperty VerticalOffsetProperty

Identifies the VerticalOffset dependency property.

public : static DependencyProperty VerticalOffsetProperty { get; }public static DependencyProperty VerticalOffsetProperty { get; }Public Static ReadOnly Property VerticalOffsetProperty As DependencyProperty// This API is not available in Javascript.

VerticalScrollBarVisibility VerticalScrollBarVisibility VerticalScrollBarVisibility VerticalScrollBarVisibility

Gets or sets a value that indicates whether a vertical ScrollBar should be displayed.

public : ScrollBarVisibility VerticalScrollBarVisibility { get; set; }public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }Public ReadWrite Property VerticalScrollBarVisibility As ScrollBarVisibility// This API is not available in Javascript.
<ScrollViewer VerticalScrollBarVisibility="scrollBarVisibilityMemberName"/>
-or-
<object ScrollViewer.VerticalScrollBarVisibility="scrollBarVisibilityMemberName"/>
Value
ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility

A ScrollBarVisibility value that indicates whether a vertical ScrollBar should be displayed. The default value is Visible.

Remarks

Scrolling behavior can also be set through a ScrollViewer.VerticalScrollBarVisibility XAML attached property usage, or by calling SetVerticalScrollBarVisibility. This is for cases where the ScrollViewer is implicit, such as when the ScrollViewer exists in the default template for a GridView, and you want to be able to influence the scrolling behavior without accessing template parts. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

VerticalScrollBarVisibilityProperty VerticalScrollBarVisibilityProperty VerticalScrollBarVisibilityProperty VerticalScrollBarVisibilityProperty

Identifies the VerticalScrollBarVisibility dependency property.

public : static DependencyProperty VerticalScrollBarVisibilityProperty { get; }public static DependencyProperty VerticalScrollBarVisibilityProperty { get; }Public Static ReadOnly Property VerticalScrollBarVisibilityProperty As DependencyProperty// This API is not available in Javascript.

VerticalScrollMode VerticalScrollMode VerticalScrollMode VerticalScrollMode

Gets or sets a value that determines how manipulation input influences scrolling behavior on the vertical axis.

public : ScrollMode VerticalScrollMode { get; set; }public ScrollMode VerticalScrollMode { get; set; }Public ReadWrite Property VerticalScrollMode As ScrollMode// This API is not available in Javascript.
<ScrollViewer VerticalScrollMode="scrollModeMemberName" />
-or-
<object ScrollViewer.VerticalScrollMode="scrollModeMemberName"/>
Value
ScrollMode ScrollMode ScrollMode ScrollMode

A value of the enumeration. The typical default (as set through the default template, not class initialization) is Enabled.

Remarks

Scrolling behavior can also be set through a ScrollViewer.VerticalScrollMode XAML attached property usage, or by calling SetVerticalScrollMode. This is for cases where the ScrollViewer is implicit, such as when the ScrollViewer exists in the default template for a GridView, and you want to be able to influence the scrolling behavior without accessing template parts. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

VerticalScrollModeProperty VerticalScrollModeProperty VerticalScrollModeProperty VerticalScrollModeProperty

Identifies the VerticalScrollMode dependency property.

public : static DependencyProperty VerticalScrollModeProperty { get; }public static DependencyProperty VerticalScrollModeProperty { get; }Public Static ReadOnly Property VerticalScrollModeProperty As DependencyProperty// This API is not available in Javascript.

VerticalSnapPointsAlignment VerticalSnapPointsAlignment VerticalSnapPointsAlignment VerticalSnapPointsAlignment

Gets or sets a value that indicates how the existing snap points are vertically aligned versus the initial viewport.

public : SnapPointsAlignment VerticalSnapPointsAlignment { get; set; }public SnapPointsAlignment VerticalSnapPointsAlignment { get; set; }Public ReadWrite Property VerticalSnapPointsAlignment As SnapPointsAlignment// This API is not available in Javascript.
<ScrollViewer VerticalSnapPointsAlignment="snapPointsAlignmentMemberName" />

VerticalSnapPointsAlignmentProperty VerticalSnapPointsAlignmentProperty VerticalSnapPointsAlignmentProperty VerticalSnapPointsAlignmentProperty

Identifies the VerticalSnapPointsAlignment dependency property.

public : static DependencyProperty VerticalSnapPointsAlignmentProperty { get; }public static DependencyProperty VerticalSnapPointsAlignmentProperty { get; }Public Static ReadOnly Property VerticalSnapPointsAlignmentProperty As DependencyProperty// This API is not available in Javascript.

VerticalSnapPointsType VerticalSnapPointsType VerticalSnapPointsType VerticalSnapPointsType

Gets or sets a value that declares how manipulation behavior reacts to the snap points along the vertical axis.

public : SnapPointsType VerticalSnapPointsType { get; set; }public SnapPointsType VerticalSnapPointsType { get; set; }Public ReadWrite Property VerticalSnapPointsType As SnapPointsType// This API is not available in Javascript.
<ScrollViewer VerticalSnapPointsType="snapPointsTypeMemberName" />
Value
SnapPointsType SnapPointsType SnapPointsType SnapPointsType

A value of the enumeration. The default is None but might be set through a control template.

Examples

This XAML is from the default template for a Hub control. A Hub has a ScrollViewer part that surrounds an ItemsStackPanel for its content. Hub uses the Optional value for its snapping behavior in both dimensions (although VerticalScrollMode is disabled in starting visual states) and disables ZoomMode. Note how the SnapPointsAlignment properties are also set as attributes here.


<ControlTemplate TargetType="Hub">
...
<ScrollViewer x:Name="ScrollViewer"
    Grid.RowSpan="2"
    HorizontalScrollMode="Auto"
    HorizontalScrollBarVisibility="Auto"
    VerticalScrollMode="Disabled"
    VerticalScrollBarVisibility="Disabled"
    HorizontalSnapPointsAlignment="Near"
    HorizontalSnapPointsType="Optional"
    VerticalSnapPointsAlignment="Near"
    VerticalSnapPointsType="Optional"
    ZoomMode="Disabled">
  <ItemsStackPanel x:Name="Panel" 
       Orientation="{TemplateBinding Orientation}"
       CacheLength="20" />
</ScrollViewer>
...
</ControlTemplate>

Remarks

For panning actions, there are often natural stopping places. Snap points provide a way to indicate where these places are. Then, when a user swipes, the manipulation result favors that natural point using behavior as expressed by a SnapPointsType value.

Proximity points (Optional** and *OptionalSingle*): ** When a user is going to naturally stop the manipulation in the proximity of a snap point, proximity points help the user land at the natural stopping place. Because the user has to land in proximity to the snap point to cause it to stop there, the user will sometimes have to perform another swipe to reach a snap point.

Mandatory snap points (Mandatory** and *MandatorySingle*): ** In contrast to proximity, mandatory snap points ensure that the content is adjusted to always land on a snap point. Even if the user releases the manipulation halfway between two snap-points, it will always move to one of the snap points.

To see the effects of snap points on ScrollViewer behavior yourself, get the XAML scrolling, panning and zooming sample. Run the sample on a touch device (not the simulator). Try out the SnapPointsType values when you view the "Panning with snap-points" example page of the sample.

To learn more about the swipe gesture and panning, see the "Panning behaviors" section of Guidelines for panning.

The default value of None is the default of the enumeration. If it's set, this property is often set as an attribute in a XAML template part, or as a style Setter. Each control potentially sets this differently. Getting the value at run time will provide the value that came from applied styles and templates.

See Also

VerticalSnapPointsTypeProperty VerticalSnapPointsTypeProperty VerticalSnapPointsTypeProperty VerticalSnapPointsTypeProperty

Identifies the VerticalSnapPointsType dependency property.

public : static DependencyProperty VerticalSnapPointsTypeProperty { get; }public static DependencyProperty VerticalSnapPointsTypeProperty { get; }Public Static ReadOnly Property VerticalSnapPointsTypeProperty As DependencyProperty// This API is not available in Javascript.

ViewportHeight ViewportHeight ViewportHeight ViewportHeight

Gets the vertical size of the viewable content.

public : double ViewportHeight { get; }public double ViewportHeight { get; }Public ReadOnly Property ViewportHeight As double// This API is not available in Javascript.
Value
double double double double

The vertical size of the viewable content.

Remarks

The viewport includes all the visible content in the ScrollViewer.

See Also

ViewportHeightProperty ViewportHeightProperty ViewportHeightProperty ViewportHeightProperty

Identifies the ViewportHeight dependency property.

public : static DependencyProperty ViewportHeightProperty { get; }public static DependencyProperty ViewportHeightProperty { get; }Public Static ReadOnly Property ViewportHeightProperty As DependencyProperty// This API is not available in Javascript.

ViewportWidth ViewportWidth ViewportWidth ViewportWidth

Gets the horizontal size of the viewable content.

public : double ViewportWidth { get; }public double ViewportWidth { get; }Public ReadOnly Property ViewportWidth As double// This API is not available in Javascript.
Value
double double double double

The horizontal size of the viewable content.

Remarks

The viewport includes all the visible content in the ScrollViewer.

See Also

ViewportWidthProperty ViewportWidthProperty ViewportWidthProperty ViewportWidthProperty

Identifies the ViewportWidth dependency property.

public : static DependencyProperty ViewportWidthProperty { get; }public static DependencyProperty ViewportWidthProperty { get; }Public Static ReadOnly Property ViewportWidthProperty As DependencyProperty// This API is not available in Javascript.

ZoomFactor ZoomFactor ZoomFactor ZoomFactor

Gets a value that indicates the current zoom factor engaged for content scaling.

public : float ZoomFactor { get; }public float ZoomFactor { get; }Public ReadOnly Property ZoomFactor As float// This API is not available in Javascript.
Value
float float float float

The current zoom factor engaged for content scaling. The default is 1.0, where 1.0 indicates no additional scaling.

Remarks

To change the value of this property at run-time or for initialization, use ZoomToFactor.

ZoomFactorProperty ZoomFactorProperty ZoomFactorProperty ZoomFactorProperty

Identifies the ZoomFactor dependency property.

public : static DependencyProperty ZoomFactorProperty { get; }public static DependencyProperty ZoomFactorProperty { get; }Public Static ReadOnly Property ZoomFactorProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ZoomFactor dependency property.

ZoomMode ZoomMode ZoomMode ZoomMode

Gets or sets a value that indicates whether zoom behavior in the ScrollViewer content is enabled.

public : ZoomMode ZoomMode { get; set; }public ZoomMode ZoomMode { get; set; }Public ReadWrite Property ZoomMode As ZoomMode// This API is not available in Javascript.
<ScrollViewer ZoomMode="zoomModeMemberName" />
-or-
<object ScrollViewer.ZoomMode="zoomModeMemberName"/>
Value
ZoomMode ZoomMode ZoomMode ZoomMode

A value of the enumeration.

Remarks

No default value is listed for this property. Controls that incorporate a ScrollViewer in compositing often set a value for ZoomMode in the default template and starting visual states, and it is this templated value that you will typically start with. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

ZoomModeProperty ZoomModeProperty ZoomModeProperty ZoomModeProperty

Identifies the ZoomMode dependency property.

public : static DependencyProperty ZoomModeProperty { get; }public static DependencyProperty ZoomModeProperty { get; }Public Static ReadOnly Property ZoomModeProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ZoomMode dependency property.

ZoomSnapPoints ZoomSnapPoints ZoomSnapPoints ZoomSnapPoints

Gets the observable collection of zoom snap point factors that are held by the ScrollViewer.

public : IVector<float> ZoomSnapPoints { get; }public IList<float> ZoomSnapPoints { get; }Public ReadOnly Property ZoomSnapPoints As IList<float>// This API is not available in Javascript.
Value
IVector<float> IList<float> IList<float> IList<float>

A collection of Single values that represent zoom factors as snap points.

ZoomSnapPointsProperty ZoomSnapPointsProperty ZoomSnapPointsProperty ZoomSnapPointsProperty

Identifies the ZoomSnapPoints dependency property.

public : static DependencyProperty ZoomSnapPointsProperty { get; }public static DependencyProperty ZoomSnapPointsProperty { get; }Public Static ReadOnly Property ZoomSnapPointsProperty As DependencyProperty// This API is not available in Javascript.

ZoomSnapPointsType ZoomSnapPointsType ZoomSnapPointsType ZoomSnapPointsType

Gets or sets a value that indicates how zoom snap points are processed for interaction input.

public : SnapPointsType ZoomSnapPointsType { get; set; }public SnapPointsType ZoomSnapPointsType { get; set; }Public ReadWrite Property ZoomSnapPointsType As SnapPointsType// This API is not available in Javascript.
<ScrollViewer ZoomSnapPointsType="snapPointsTypeMemberName"/>
Value
SnapPointsType SnapPointsType SnapPointsType SnapPointsType

A value of the enumeration.

See Also

ZoomSnapPointsTypeProperty ZoomSnapPointsTypeProperty ZoomSnapPointsTypeProperty ZoomSnapPointsTypeProperty

Identifies the ZoomSnapPointsType dependency property.

public : static DependencyProperty ZoomSnapPointsTypeProperty { get; }public static DependencyProperty ZoomSnapPointsTypeProperty { get; }Public Static ReadOnly Property ZoomSnapPointsTypeProperty As DependencyProperty// This API is not available in Javascript.

Methods

ChangeView(IReference, IReference, IReference) ChangeView(IReference, IReference, IReference) ChangeView(IReference, IReference, IReference) ChangeView(IReference, IReference, IReference)

Causes the ScrollViewer to load a new view into the viewport using the specified offsets and zoom factor.

public : PlatForm::Boolean ChangeView(IReference<double> horizontalOffset, IReference<double> verticalOffset, IReference<float> zoomFactor)public bool ChangeView(Nullable<Double> horizontalOffset, Nullable<Double> verticalOffset, Nullable<Single> zoomFactor)Public Function ChangeView(horizontalOffset As Nullable<Double>, verticalOffset As Nullable<Double>, zoomFactor As Nullable<Single>) As bool// This API is not available in Javascript.
Parameters
horizontalOffset
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

A value between 0 and ScrollableWidth that specifies the distance the content should be scrolled horizontally.

verticalOffset
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

A value between 0 and ScrollableHeight that specifies the distance the content should be scrolled vertically.

zoomFactor
IReference<float> Nullable<Single> Nullable<Single> Nullable<Single>

A value between MinZoomFactor and MaxZoomFactor that specifies the required target ZoomFactor.

Returns
PlatForm::Boolean bool bool bool

true if the view is changed; otherwise, false.

Examples

This code results in a ScrollViewer named myScrollViewer being scrolled to a horizontal offset of 2.

bool flag = myScrollViewer.ChangeView(2, null, null); 

Remarks

You can set parameter values to null to use this method to scroll only horizontally, only vertically, or to only change the zoom factor.

See Also

ChangeView(IReference, IReference, IReference, Boolean) ChangeView(IReference, IReference, IReference, Boolean) ChangeView(IReference, IReference, IReference, Boolean) ChangeView(IReference, IReference, IReference, Boolean)

Causes the ScrollViewer to load a new view into the viewport using the specified offsets and zoom factor, and optionally disables scrolling animation.

public : PlatForm::Boolean ChangeView(IReference<double> horizontalOffset, IReference<double> verticalOffset, IReference<float> zoomFactor, bool disableAnimation)public bool ChangeView(Nullable<Double> horizontalOffset, Nullable<Double> verticalOffset, Nullable<Single> zoomFactor, Boolean disableAnimation)Public Function ChangeView(horizontalOffset As Nullable<Double>, verticalOffset As Nullable<Double>, zoomFactor As Nullable<Single>, disableAnimation As Boolean) As bool// This API is not available in Javascript.
Parameters
horizontalOffset
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

A value between 0 and ScrollableWidth that specifies the distance the content should be scrolled horizontally.

verticalOffset
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

A value between 0 and ScrollableHeight that specifies the distance the content should be scrolled vertically.

zoomFactor
IReference<float> Nullable<Single> Nullable<Single> Nullable<Single>

A value between MinZoomFactor and MaxZoomFactor that specifies the required target ZoomFactor.

disableAnimation
bool Boolean Boolean Boolean

true to disable zoom/pan animations while changing the view; otherwise, false. The default is false.

Returns
PlatForm::Boolean bool bool bool

true if the view is changed; otherwise, false.

Examples

This code results in a ScrollViewer named myScrollViewer being scrolled to a horizontal offset of 2 without animation.

bool flag = myScrollViewer.ChangeView(2, null, null, true); 

Remarks

You can set parameter values to null to use this method to scroll only horizontally, only vertically, or to only change the zoom factor.

See Also

GetBringIntoViewOnFocusChange(DependencyObject) GetBringIntoViewOnFocusChange(DependencyObject) GetBringIntoViewOnFocusChange(DependencyObject) GetBringIntoViewOnFocusChange(DependencyObject)

Gets the value of the BringIntoViewOnFocusChange dependency property / ScrollViewer.BringIntoViewOnFocusChange XAML attached property from a specified element.

public : static PlatForm::Boolean GetBringIntoViewOnFocusChange(DependencyObject element)public static bool GetBringIntoViewOnFocusChange(DependencyObject element)Public Static Function GetBringIntoViewOnFocusChange(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see Remarks for the BringIntoViewOnFocusChange property.

See Also

GetHorizontalScrollBarVisibility(DependencyObject) GetHorizontalScrollBarVisibility(DependencyObject) GetHorizontalScrollBarVisibility(DependencyObject) GetHorizontalScrollBarVisibility(DependencyObject)

Gets the value of the HorizontalScrollBarVisibility dependency property / ScrollViewer.HorizontalScrollBarVisibility XAML attached property from a specified element.

public : static ScrollBarVisibility GetHorizontalScrollBarVisibility(DependencyObject element)public static ScrollBarVisibility GetHorizontalScrollBarVisibility(DependencyObject element)Public Static Function GetHorizontalScrollBarVisibility(element As DependencyObject) As ScrollBarVisibility// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns

The value of the property, as obtained from the property store.

Remarks

For more info, see Remarks for the HorizontalScrollBarVisibility property.

See Also

GetHorizontalScrollMode(DependencyObject) GetHorizontalScrollMode(DependencyObject) GetHorizontalScrollMode(DependencyObject) GetHorizontalScrollMode(DependencyObject)

Gets the value of the HorizontalScrollMode dependency property / ScrollViewer.HorizontalScrollMode XAML attached property from a specified element.

public : static ScrollMode GetHorizontalScrollMode(DependencyObject element)public static ScrollMode GetHorizontalScrollMode(DependencyObject element)Public Static Function GetHorizontalScrollMode(element As DependencyObject) As ScrollMode// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns

The value of the property, as obtained from the property store.

Remarks

For more info, see Remarks for the HorizontalScrollMode property.

See Also

GetIsDeferredScrollingEnabled(DependencyObject) GetIsDeferredScrollingEnabled(DependencyObject) GetIsDeferredScrollingEnabled(DependencyObject) GetIsDeferredScrollingEnabled(DependencyObject)

Gets the value of the IsDeferredScrollingEnabled dependency property / ScrollViewer.IsDeferredScrollingInertiaEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsDeferredScrollingEnabled(DependencyObject element)public static bool GetIsDeferredScrollingEnabled(DependencyObject element)Public Static Function GetIsDeferredScrollingEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see Remarks for the IsDeferredScrollingEnabled property.

See Also

GetIsHorizontalRailEnabled(DependencyObject) GetIsHorizontalRailEnabled(DependencyObject) GetIsHorizontalRailEnabled(DependencyObject) GetIsHorizontalRailEnabled(DependencyObject)

Gets the value of the IsHorizontalRailEnabled dependency property / ScrollViewer.IsHorizontalRailEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsHorizontalRailEnabled(DependencyObject element)public static bool GetIsHorizontalRailEnabled(DependencyObject element)Public Static Function GetIsHorizontalRailEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsHorizontalRailEnabled property.

See Also

GetIsHorizontalScrollChainingEnabled(DependencyObject) GetIsHorizontalScrollChainingEnabled(DependencyObject) GetIsHorizontalScrollChainingEnabled(DependencyObject) GetIsHorizontalScrollChainingEnabled(DependencyObject)

Gets the value of the IsHorizontalScrollChainingEnabled dependency property / ScrollViewer.IsHorizontalScrollChainingEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsHorizontalScrollChainingEnabled(DependencyObject element)public static bool GetIsHorizontalScrollChainingEnabled(DependencyObject element)Public Static Function GetIsHorizontalScrollChainingEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsHorizontalScrollChainingEnabled property.

See Also

GetIsScrollInertiaEnabled(DependencyObject) GetIsScrollInertiaEnabled(DependencyObject) GetIsScrollInertiaEnabled(DependencyObject) GetIsScrollInertiaEnabled(DependencyObject)

Gets the value of the IsScrollInertiaEnabled dependency property / ScrollViewer.IsScrollInertiaEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsScrollInertiaEnabled(DependencyObject element)public static bool GetIsScrollInertiaEnabled(DependencyObject element)Public Static Function GetIsScrollInertiaEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsScrollInertiaEnabled property.

See Also

GetIsVerticalRailEnabled(DependencyObject) GetIsVerticalRailEnabled(DependencyObject) GetIsVerticalRailEnabled(DependencyObject) GetIsVerticalRailEnabled(DependencyObject)

Gets the value of the IsVerticalRailEnabled dependency property / ScrollViewer.IsVerticalRailEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsVerticalRailEnabled(DependencyObject element)public static bool GetIsVerticalRailEnabled(DependencyObject element)Public Static Function GetIsVerticalRailEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsVerticalRailEnabled property.

See Also

GetIsVerticalScrollChainingEnabled(DependencyObject) GetIsVerticalScrollChainingEnabled(DependencyObject) GetIsVerticalScrollChainingEnabled(DependencyObject) GetIsVerticalScrollChainingEnabled(DependencyObject)

Gets the value of the IsVerticalScrollChainingEnabled dependency property / ScrollViewer.IsVerticalScrollChainingEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsVerticalScrollChainingEnabled(DependencyObject element)public static bool GetIsVerticalScrollChainingEnabled(DependencyObject element)Public Static Function GetIsVerticalScrollChainingEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsVerticalScrollChainingEnabled property.

See Also

GetIsZoomChainingEnabled(DependencyObject) GetIsZoomChainingEnabled(DependencyObject) GetIsZoomChainingEnabled(DependencyObject) GetIsZoomChainingEnabled(DependencyObject)

Gets the value of the IsZoomChainingEnabled dependency property / ScrollViewer.IsZoomChainingEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsZoomChainingEnabled(DependencyObject element)public static bool GetIsZoomChainingEnabled(DependencyObject element)Public Static Function GetIsZoomChainingEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsZoomChainingEnabled property.

See Also

GetIsZoomInertiaEnabled(DependencyObject) GetIsZoomInertiaEnabled(DependencyObject) GetIsZoomInertiaEnabled(DependencyObject) GetIsZoomInertiaEnabled(DependencyObject)

Gets the value of the IsZoomInertiaEnabled dependency property / ScrollViewer.IsZoomInertiaEnabled XAML attached property from a specified element.

public : static PlatForm::Boolean GetIsZoomInertiaEnabled(DependencyObject element)public static bool GetIsZoomInertiaEnabled(DependencyObject element)Public Static Function GetIsZoomInertiaEnabled(element As DependencyObject) As bool// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns
PlatForm::Boolean bool bool bool

The value of the property, as obtained from the property store.

Remarks

For more info, see the IsZoomInertiaEnabled property.

See Also

GetVerticalScrollBarVisibility(DependencyObject) GetVerticalScrollBarVisibility(DependencyObject) GetVerticalScrollBarVisibility(DependencyObject) GetVerticalScrollBarVisibility(DependencyObject)

Gets the value of the VerticalScrollBarVisibility dependency property / ScrollViewer.VerticalScrollBarVisibility XAML attached property from a specified element.

public : static ScrollBarVisibility GetVerticalScrollBarVisibility(DependencyObject element)public static ScrollBarVisibility GetVerticalScrollBarVisibility(DependencyObject element)Public Static Function GetVerticalScrollBarVisibility(element As DependencyObject) As ScrollBarVisibility// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns

The value of the property, as obtained from the property store.

Remarks

For more info, see the VerticalScrollBarVisibility property.

See Also

GetVerticalScrollMode(DependencyObject) GetVerticalScrollMode(DependencyObject) GetVerticalScrollMode(DependencyObject) GetVerticalScrollMode(DependencyObject)

Gets the value of the VerticalScrollMode dependency property / ScrollViewer.VerticalScrollMode XAML attached property from a specified element.

public : static ScrollMode GetVerticalScrollMode(DependencyObject element)public static ScrollMode GetVerticalScrollMode(DependencyObject element)Public Static Function GetVerticalScrollMode(element As DependencyObject) As ScrollMode// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns

The value of the property, as obtained from the property store.

Remarks

For more info, see the VerticalScrollMode property.

See Also

GetZoomMode(DependencyObject) GetZoomMode(DependencyObject) GetZoomMode(DependencyObject) GetZoomMode(DependencyObject)

Gets the value of the ZoomMode dependency property / ScrollViewer.ZoomMode XAML attached property from a specified element.

public : static ZoomMode GetZoomMode(DependencyObject element)public static ZoomMode GetZoomMode(DependencyObject element)Public Static Function GetZoomMode(element As DependencyObject) As ZoomMode// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which the property value is read.

Returns

The value of the property, as obtained from the property store.

Remarks

For more info, see the ZoomMode property.

See Also

InvalidateScrollInfo() InvalidateScrollInfo() InvalidateScrollInfo() InvalidateScrollInfo()

Called when the value of properties that describe the size and location of the scroll area change.

public : void InvalidateScrollInfo()public void InvalidateScrollInfo()Public Function InvalidateScrollInfo() As void// This API is not available in Javascript.

ScrollToHorizontalOffset(Double) ScrollToHorizontalOffset(Double) ScrollToHorizontalOffset(Double) ScrollToHorizontalOffset(Double)

Note

ScrollToHorizontalOffset may be altered or unavailable for releases after Windows 8.1. Instead, use ChangeView.

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

public : void ScrollToHorizontalOffset(double offset)public void ScrollToHorizontalOffset(Double offset)Public Function ScrollToHorizontalOffset(offset As Double) As void// This API is not available in Javascript.
Parameters
offset
double Double Double Double

The position that the content scrolls to.

ScrollToVerticalOffset(Double) ScrollToVerticalOffset(Double) ScrollToVerticalOffset(Double) ScrollToVerticalOffset(Double)

Note

ScrollToVerticalOffset may be altered or unavailable for releases after Windows 8.1. Instead, use ChangeView.

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

public : void ScrollToVerticalOffset(double offset)public void ScrollToVerticalOffset(Double offset)Public Function ScrollToVerticalOffset(offset As Double) As void// This API is not available in Javascript.
Parameters
offset
double Double Double Double

The position that the content scrolls to.

SetBringIntoViewOnFocusChange(DependencyObject, Boolean) SetBringIntoViewOnFocusChange(DependencyObject, Boolean) SetBringIntoViewOnFocusChange(DependencyObject, Boolean) SetBringIntoViewOnFocusChange(DependencyObject, Boolean)

Sets the value of the BringIntoViewOnFocusChange dependency property / ScrollViewer.BringIntoViewOnFocusChange XAML attached property on a specified element.

public : static void SetBringIntoViewOnFocusChange(DependencyObject element, bool bringIntoViewOnFocusChange)public static void SetBringIntoViewOnFocusChange(DependencyObject element, Boolean bringIntoViewOnFocusChange)Public Static Function SetBringIntoViewOnFocusChange(element As DependencyObject, bringIntoViewOnFocusChange As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

bringIntoViewOnFocusChange
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see Remarks for the BringIntoViewOnFocusChange property.

See Also

SetHorizontalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetHorizontalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetHorizontalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetHorizontalScrollBarVisibility(DependencyObject, ScrollBarVisibility)

Sets the value of the HorizontalScrollBarVisibility dependency property / ScrollViewer.HorizontalScrollBarVisibility XAML attached property on a specified element.

public : static void SetHorizontalScrollBarVisibility(DependencyObject element, ScrollBarVisibility horizontalScrollBarVisibility)public static void SetHorizontalScrollBarVisibility(DependencyObject element, ScrollBarVisibility horizontalScrollBarVisibility)Public Static Function SetHorizontalScrollBarVisibility(element As DependencyObject, horizontalScrollBarVisibility As ScrollBarVisibility) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

horizontalScrollBarVisibility
ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility

The value to set.

Remarks

For more info, see Remarks for the HorizontalScrollBarVisibility property.

See Also

SetHorizontalScrollMode(DependencyObject, ScrollMode) SetHorizontalScrollMode(DependencyObject, ScrollMode) SetHorizontalScrollMode(DependencyObject, ScrollMode) SetHorizontalScrollMode(DependencyObject, ScrollMode)

Sets the value of the HorizontalScrollMode dependency property / ScrollViewer.HorizontalScrollMode XAML attached property on a specified element.

public : static void SetHorizontalScrollMode(DependencyObject element, ScrollMode horizontalScrollMode)public static void SetHorizontalScrollMode(DependencyObject element, ScrollMode horizontalScrollMode)Public Static Function SetHorizontalScrollMode(element As DependencyObject, horizontalScrollMode As ScrollMode) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

horizontalScrollMode
ScrollMode ScrollMode ScrollMode ScrollMode

The value to set.

Remarks

For more info, see Remarks for the HorizontalScrollMode property.

See Also

SetIsDeferredScrollingEnabled(DependencyObject, Boolean) SetIsDeferredScrollingEnabled(DependencyObject, Boolean) SetIsDeferredScrollingEnabled(DependencyObject, Boolean) SetIsDeferredScrollingEnabled(DependencyObject, Boolean)

Sets the value of the IsDeferredScrollingEnabled dependency property / ScrollViewer.IsDeferredScrollingEnabled XAML attached property on a specified element.

public : static void SetIsDeferredScrollingEnabled(DependencyObject element, bool isDeferredScrollingEnabled)public static void SetIsDeferredScrollingEnabled(DependencyObject element, Boolean isDeferredScrollingEnabled)Public Static Function SetIsDeferredScrollingEnabled(element As DependencyObject, isDeferredScrollingEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isDeferredScrollingEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see Remarks for the IsDeferredScrollingEnabled property.

See Also

SetIsHorizontalRailEnabled(DependencyObject, Boolean) SetIsHorizontalRailEnabled(DependencyObject, Boolean) SetIsHorizontalRailEnabled(DependencyObject, Boolean) SetIsHorizontalRailEnabled(DependencyObject, Boolean)

Sets the value of the IsHorizontalRailEnabled dependency property / ScrollViewer.IsHorizontalRailEnabled XAML attached property on a specified element.

public : static void SetIsHorizontalRailEnabled(DependencyObject element, bool isHorizontalRailEnabled)public static void SetIsHorizontalRailEnabled(DependencyObject element, Boolean isHorizontalRailEnabled)Public Static Function SetIsHorizontalRailEnabled(element As DependencyObject, isHorizontalRailEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isHorizontalRailEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsHorizontalRailEnabled property.

See Also

SetIsHorizontalScrollChainingEnabled(DependencyObject, Boolean) SetIsHorizontalScrollChainingEnabled(DependencyObject, Boolean) SetIsHorizontalScrollChainingEnabled(DependencyObject, Boolean) SetIsHorizontalScrollChainingEnabled(DependencyObject, Boolean)

Sets the value of the IsHorizontalScrollChainingEnabled dependency property / ScrollViewer.IsHorizontalScrollChainingEnabled XAML attached property on a specified element.

public : static void SetIsHorizontalScrollChainingEnabled(DependencyObject element, bool isHorizontalScrollChainingEnabled)public static void SetIsHorizontalScrollChainingEnabled(DependencyObject element, Boolean isHorizontalScrollChainingEnabled)Public Static Function SetIsHorizontalScrollChainingEnabled(element As DependencyObject, isHorizontalScrollChainingEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isHorizontalScrollChainingEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsHorizontalScrollChainingEnabled property.

See Also

SetIsScrollInertiaEnabled(DependencyObject, Boolean) SetIsScrollInertiaEnabled(DependencyObject, Boolean) SetIsScrollInertiaEnabled(DependencyObject, Boolean) SetIsScrollInertiaEnabled(DependencyObject, Boolean)

Sets the value of the IsScrollInertiaEnabled dependency property / ScrollViewer.IsScrollInertiaEnabled XAML attached property on a specified element.

public : static void SetIsScrollInertiaEnabled(DependencyObject element, bool isScrollInertiaEnabled)public static void SetIsScrollInertiaEnabled(DependencyObject element, Boolean isScrollInertiaEnabled)Public Static Function SetIsScrollInertiaEnabled(element As DependencyObject, isScrollInertiaEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isScrollInertiaEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsScrollInertiaEnabled property.

See Also

SetIsVerticalRailEnabled(DependencyObject, Boolean) SetIsVerticalRailEnabled(DependencyObject, Boolean) SetIsVerticalRailEnabled(DependencyObject, Boolean) SetIsVerticalRailEnabled(DependencyObject, Boolean)

Sets the value of the IsVerticalRailEnabled dependency property / ScrollViewer.IsVerticalRailEnabled XAML attached property on a specified element.

public : static void SetIsVerticalRailEnabled(DependencyObject element, bool isVerticalRailEnabled)public static void SetIsVerticalRailEnabled(DependencyObject element, Boolean isVerticalRailEnabled)Public Static Function SetIsVerticalRailEnabled(element As DependencyObject, isVerticalRailEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isVerticalRailEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsVerticalRailEnabled property.

See Also

SetIsVerticalScrollChainingEnabled(DependencyObject, Boolean) SetIsVerticalScrollChainingEnabled(DependencyObject, Boolean) SetIsVerticalScrollChainingEnabled(DependencyObject, Boolean) SetIsVerticalScrollChainingEnabled(DependencyObject, Boolean)

Sets the value of the IsVerticalScrollChainingEnabled dependency property / ScrollViewer.IsVerticalScrollChainingEnabled XAML attached property on a specified element.

public : static void SetIsVerticalScrollChainingEnabled(DependencyObject element, bool isVerticalScrollChainingEnabled)public static void SetIsVerticalScrollChainingEnabled(DependencyObject element, Boolean isVerticalScrollChainingEnabled)Public Static Function SetIsVerticalScrollChainingEnabled(element As DependencyObject, isVerticalScrollChainingEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isVerticalScrollChainingEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsVerticalScrollChainingEnabled property.

See Also

SetIsZoomChainingEnabled(DependencyObject, Boolean) SetIsZoomChainingEnabled(DependencyObject, Boolean) SetIsZoomChainingEnabled(DependencyObject, Boolean) SetIsZoomChainingEnabled(DependencyObject, Boolean)

Sets the value of the IsZoomChainingEnabled dependency property / ScrollViewer.IsZoomChainingEnabled XAML attached property on a specified element.

public : static void SetIsZoomChainingEnabled(DependencyObject element, bool isZoomChainingEnabled)public static void SetIsZoomChainingEnabled(DependencyObject element, Boolean isZoomChainingEnabled)Public Static Function SetIsZoomChainingEnabled(element As DependencyObject, isZoomChainingEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isZoomChainingEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsZoomChainingEnabled property.

See Also

SetIsZoomInertiaEnabled(DependencyObject, Boolean) SetIsZoomInertiaEnabled(DependencyObject, Boolean) SetIsZoomInertiaEnabled(DependencyObject, Boolean) SetIsZoomInertiaEnabled(DependencyObject, Boolean)

Sets the value of the IsZoomInertiaEnabled dependency property / ScrollViewer.IsZoomInertiaEnabled XAML attached property on a specified element.

public : static void SetIsZoomInertiaEnabled(DependencyObject element, bool isZoomInertiaEnabled)public static void SetIsZoomInertiaEnabled(DependencyObject element, Boolean isZoomInertiaEnabled)Public Static Function SetIsZoomInertiaEnabled(element As DependencyObject, isZoomInertiaEnabled As Boolean) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

isZoomInertiaEnabled
bool Boolean Boolean Boolean

The value to set.

Remarks

For more info, see the IsZoomInertiaEnabled property.

See Also

SetVerticalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetVerticalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetVerticalScrollBarVisibility(DependencyObject, ScrollBarVisibility) SetVerticalScrollBarVisibility(DependencyObject, ScrollBarVisibility)

Sets the value of the VerticalScrollBarVisibility dependency property / ScrollViewer.VerticalScrollBarVisibility XAML attached property on a specified element.

public : static void SetVerticalScrollBarVisibility(DependencyObject element, ScrollBarVisibility verticalScrollBarVisibility)public static void SetVerticalScrollBarVisibility(DependencyObject element, ScrollBarVisibility verticalScrollBarVisibility)Public Static Function SetVerticalScrollBarVisibility(element As DependencyObject, verticalScrollBarVisibility As ScrollBarVisibility) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

verticalScrollBarVisibility
ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility ScrollBarVisibility

The value to set.

Remarks

For more info, see the VerticalScrollBarVisibility property.

See Also

SetVerticalScrollMode(DependencyObject, ScrollMode) SetVerticalScrollMode(DependencyObject, ScrollMode) SetVerticalScrollMode(DependencyObject, ScrollMode) SetVerticalScrollMode(DependencyObject, ScrollMode)

Sets the value of the VerticalScrollMode dependency property / ScrollViewer.VerticalScrollMode XAML attached property on a specified element.

public : static void SetVerticalScrollMode(DependencyObject element, ScrollMode verticalScrollMode)public static void SetVerticalScrollMode(DependencyObject element, ScrollMode verticalScrollMode)Public Static Function SetVerticalScrollMode(element As DependencyObject, verticalScrollMode As ScrollMode) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

verticalScrollMode
ScrollMode ScrollMode ScrollMode ScrollMode

The value to set.

Remarks

For more info, see the VerticalScrollMode property.

See Also

SetZoomMode(DependencyObject, ZoomMode) SetZoomMode(DependencyObject, ZoomMode) SetZoomMode(DependencyObject, ZoomMode) SetZoomMode(DependencyObject, ZoomMode)

Sets the value of the ZoomMode dependency property / ScrollViewer.ZoomMode XAML attached property on a specified element.

public : static void SetZoomMode(DependencyObject element, ZoomMode zoomMode)public static void SetZoomMode(DependencyObject element, ZoomMode zoomMode)Public Static Function SetZoomMode(element As DependencyObject, zoomMode As ZoomMode) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

zoomMode
ZoomMode ZoomMode ZoomMode ZoomMode

The value to set.

Remarks

For more info, see the ZoomMode property.

See Also

ZoomToFactor(Single) ZoomToFactor(Single) ZoomToFactor(Single) ZoomToFactor(Single)

Note

ZoomToFactor may be altered or unavailable for releases after Windows 8.1. Instead, use ChangeView.

Sets the effective value of ZoomFactor.

public : void ZoomToFactor(float factor)public void ZoomToFactor(Single factor)Public Function ZoomToFactor(factor As Single) As void// This API is not available in Javascript.
Parameters
factor
float Single Single Single

The zoom factor to set. The factors are based on a norm of 1.0, which represents no zoom applied. The values you can set are also influenced by current values for MinZoomFactor and MaxZoomFactor.

Events

DirectManipulationCompleted DirectManipulationCompleted DirectManipulationCompleted DirectManipulationCompleted

Occurs when any direct manipulation of the ScrollViewer finishes.

public : event EventHandler DirectManipulationCompleted<object>public event EventHandler DirectManipulationCompleted<object>Public Event DirectManipulationCompleted<object>// This API is not available in Javascript.

DirectManipulationStarted DirectManipulationStarted DirectManipulationStarted DirectManipulationStarted

Occurs when any direct manipulation of the ScrollViewer begins.

public : event EventHandler DirectManipulationStarted<object>public event EventHandler DirectManipulationStarted<object>Public Event DirectManipulationStarted<object>// This API is not available in Javascript.

ViewChanged ViewChanged ViewChanged ViewChanged

Occurs when manipulations such as scrolling and zooming have caused the view to change.

public : event EventHandler ViewChanged<ScrollViewerViewChangedEventArgs>public event EventHandler ViewChanged<ScrollViewerViewChangedEventArgs>Public Event ViewChanged<ScrollViewerViewChangedEventArgs>// This API is not available in Javascript.
<ScrollViewer ViewChanged="eventhandler"/>

Remarks

ViewChanging fires before ViewChanged.

In your event handler, use a parameter of type ScrollViewerViewChangedEventArgs for the second parameter of your handler method. ScrollViewerViewChangedEventArgs includes the IsIntermediate property, which reports whether the manipulation that fired the event is completed or still ongoing.

Not every underlying manipulation will necessarily fire this event. The class logic delays and consolidates intermediate events into a single occurrence in some cases.

See Also

ViewChanging ViewChanging ViewChanging ViewChanging

Occurs when manipulations such as scrolling and zooming cause the view to change.

public : event EventHandler ViewChanging<ScrollViewerViewChangingEventArgs>public event EventHandler ViewChanging<ScrollViewerViewChangingEventArgs>Public Event ViewChanging<ScrollViewerViewChangingEventArgs>// This API is not available in Javascript.
<ScrollViewer ViewChanging="eventhandler"/>

Remarks

ScrollViewerViewChangingEventArgs includes the IsInertial property, which reports whether the manipulation that is firing the event contains an inertial component.

Not every underlying manipulation will necessarily fire this event. The ScrollViewer logic delays and consolidates intermediate events into a single occurrence in some cases.

See Also