IScrollInfo Interface

IScrollInfo Interface

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents the main scrollable region inside a ScrollViewer control.

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

No code example is currently available or this language may not be supported.

The IScrollInfo type exposes the following members.

  NameDescription
Public propertyCanHorizontallyScrollGets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Public propertyCanVerticallyScrollGets or sets a value that indicates whether scrolling on the vertical axis is possible.
Public propertyExtentHeightGets the vertical size of the extent.
Public propertyExtentWidthGets the horizontal size of the extent.
Public propertyHorizontalOffsetGets the horizontal offset of the scrolled content.
Public propertyScrollOwnerGets or sets a ScrollViewer element that controls scrolling behavior.
Public propertyVerticalOffsetGets the vertical offset of the scrolled content.
Public propertyViewportHeightGets the vertical size of the viewport for this content.
Public propertyViewportWidthGets the horizontal size of the viewport for this content.
Top

  NameDescription
Public methodLineDownScrolls down within the content by one logical unit.
Public methodLineLeftScrolls left within the content by one logical unit.
Public methodLineRightScrolls right within the content by one logical unit.
Public methodLineUpScrolls up within the content by one logical unit.
Public methodMakeVisibleForces content to scroll until the coordinate space of a visual object is visible.
Public methodMouseWheelDownScrolls down within the content.
Public methodMouseWheelLeftScrolls left within the content.
Public methodMouseWheelRightScrolls right within the content.
Public methodMouseWheelUpScrolls up within the content.
Public methodPageDownScrolls down within the content by one page.
Public methodPageLeftScrolls left within the content by one page.
Public methodPageRightScrolls right within the content by one page.
Public methodPageUpScrolls up within the content by one page.
Public methodSetHorizontalOffsetSets the amount of horizontal offset.
Public methodSetVerticalOffsetSets the amount of vertical offset.
Top

The IScrollInfo interface exposes access to methods that enable logical scrolling of child content, as well as, computing which child elements are visible. In addition, it defines properties used to define the scrollable region.

Logical scrolling enables scrolling to the next element in the logical tree. In contrast, physical scrolling scrolls content by a defined measurable increment in a specified direction.

The following example uses virtualization to only instantiate the objects that are currently in view. The example implements the IScrollInfo interface to create a custom panel that derives from VirtualizingStackPanel.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft