Partager via


IScrollInfo Interface

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the main scrollable region inside a ScrollViewer control.

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

Syntax

'Declaration
Public Interface IScrollInfo
public interface IScrollInfo

The IScrollInfo type exposes the following members.

Properties

  Name Description
Public propertySupported by Silverlight for Windows Phone CanHorizontallyScroll Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Public propertySupported by Silverlight for Windows Phone CanVerticallyScroll Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Public propertySupported by Silverlight for Windows Phone ExtentHeight Gets the vertical size of the extent.
Public propertySupported by Silverlight for Windows Phone ExtentWidth Gets the horizontal size of the extent.
Public propertySupported by Silverlight for Windows Phone HorizontalOffset Gets the horizontal offset of the scrolled content.
Public propertySupported by Silverlight for Windows Phone ScrollOwner Gets or sets a ScrollViewer element that controls scrolling behavior.
Public propertySupported by Silverlight for Windows Phone VerticalOffset Gets the vertical offset of the scrolled content.
Public propertySupported by Silverlight for Windows Phone ViewportHeight Gets the vertical size of the viewport for this content.
Public propertySupported by Silverlight for Windows Phone ViewportWidth Gets the horizontal size of the viewport for this content.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows Phone LineDown Scrolls down within the content by one logical unit.
Public methodSupported by Silverlight for Windows Phone LineLeft Scrolls left within the content by one logical unit.
Public methodSupported by Silverlight for Windows Phone LineRight Scrolls right within the content by one logical unit.
Public methodSupported by Silverlight for Windows Phone LineUp Scrolls up within the content by one logical unit.
Public methodSupported by Silverlight for Windows Phone MakeVisible Forces content to scroll until the coordinate space of a visual object is visible.
Public methodSupported by Silverlight for Windows Phone MouseWheelDown Scrolls down within the content after the user clicks the wheel button on a mouse.
Public methodSupported by Silverlight for Windows Phone MouseWheelLeft Scrolls left within the content after the user clicks the wheel button on a mouse.
Public methodSupported by Silverlight for Windows Phone MouseWheelRight Scrolls right within the content after the user clicks the wheel button on a mouse.
Public methodSupported by Silverlight for Windows Phone MouseWheelUp Scrolls up within the content after the user clicks the wheel button on a mouse.
Public methodSupported by Silverlight for Windows Phone PageDown Scrolls down within the content by one page.
Public methodSupported by Silverlight for Windows Phone PageLeft Scrolls left within the content by one page.
Public methodSupported by Silverlight for Windows Phone PageRight Scrolls right within the content by one page.
Public methodSupported by Silverlight for Windows Phone PageUp Scrolls up within the content by one page.
Public methodSupported by Silverlight for Windows Phone SetHorizontalOffset Sets the amount of horizontal offset.
Public methodSupported by Silverlight for Windows Phone SetVerticalOffset Sets the amount of vertical offset.

Top

Remarks

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.

Examples

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.

Run this sample

Download Sample

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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