I​Scroll​Provider I​Scroll​Provider I​Scroll​Provider Interface

Definition

Exposes methods and properties to support access by a Microsoft UI Automation client to a control that acts as a scrollable container for a collection of child objects. The children of this element must implement IScrollItemProvider. Implement IScrollProvider in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.Scroll.

public interface IScrollProviderpublic interface IScrollProviderPublic Interface IScrollProvider
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

This pattern has guidelines and conventions that aren't fully documented here. For more info on what this pattern is for, see Scroll Control Pattern.

IScrollProvider is implemented by the existing Windows Runtime class ScrollViewerAutomationPeer, which is the peer for the ScrollViewer component part used in many other list controls.

Also, IScrollProvider is reported as a supported pattern by ItemsControlAutomationPeer, but only if a ScrollViewer exists in the owner's template and is active. The ScrollViewerAutomationPeer for this ScrollViewer provides the pattern implementation, ItemsControlAutomationPeer is only forwarding it.

Use ScrollPatternIdentifiers if you want to reference the IScrollProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent.

Properties

HorizontallyScrollable HorizontallyScrollable HorizontallyScrollable

Gets a value that indicates whether the control can scroll horizontally.

public PlatForm::Boolean HorizontallyScrollable { get; }public bool HorizontallyScrollable { get; }Public ReadOnly Property HorizontallyScrollable As bool
Value
bool bool bool

true if the control can scroll horizontally; otherwise, false.

Attributes

HorizontalScrollPercent HorizontalScrollPercent HorizontalScrollPercent

Gets the current horizontal scroll position.

public double HorizontalScrollPercent { get; }public double HorizontalScrollPercent { get; }Public ReadOnly Property HorizontalScrollPercent As double
Value
double double double

The horizontal scroll position as a percentage of the total content area within the control.

Attributes

HorizontalViewSize HorizontalViewSize HorizontalViewSize

Gets the current horizontal view size.

public double HorizontalViewSize { get; }public double HorizontalViewSize { get; }Public ReadOnly Property HorizontalViewSize As double
Value
double double double

The horizontal size of the viewable region as a percentage of the total content area within the control.

Attributes

VerticallyScrollable VerticallyScrollable VerticallyScrollable

Gets a value that indicates whether the control can scroll vertically.

public PlatForm::Boolean VerticallyScrollable { get; }public bool VerticallyScrollable { get; }Public ReadOnly Property VerticallyScrollable As bool
Value
bool bool bool

true if the control can scroll vertically; otherwise, false.

Attributes

VerticalScrollPercent VerticalScrollPercent VerticalScrollPercent

Gets the current vertical scroll position.

public double VerticalScrollPercent { get; }public double VerticalScrollPercent { get; }Public ReadOnly Property VerticalScrollPercent As double
Value
double double double

The vertical scroll position as a percentage of the total content area within the control.

Attributes

VerticalViewSize VerticalViewSize VerticalViewSize

Gets the vertical view size.

public double VerticalViewSize { get; }public double VerticalViewSize { get; }Public ReadOnly Property VerticalViewSize As double
Value
double double double

The vertical size of the viewable region as a percentage of the total content area within the control.

Attributes

Methods

Scroll(ScrollAmount, ScrollAmount) Scroll(ScrollAmount, ScrollAmount) Scroll(ScrollAmount, ScrollAmount)

Scrolls the visible region of the content area horizontally, vertically, or both.

public void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount)public void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount)Public Function Scroll(horizontalAmount As ScrollAmount, verticalAmount As ScrollAmount) As void
Parameters
horizontalAmount
ScrollAmount ScrollAmount ScrollAmount

The horizontal increment that is specific to the control. Pass NoScroll if the control cannot be scrolled in this direction.

verticalAmount
ScrollAmount ScrollAmount ScrollAmount

The vertical increment that is specific to the control. Pass NoScroll if the control cannot be scrolled in this direction.

Attributes

SetScrollPercent(Double, Double) SetScrollPercent(Double, Double) SetScrollPercent(Double, Double)

Sets the horizontal and vertical scroll position as a percentage of the total content area within the control.

public void SetScrollPercent(Double horizontalPercent, Double verticalPercent)public void SetScrollPercent(Double horizontalPercent, Double verticalPercent)Public Function SetScrollPercent(horizontalPercent As Double, verticalPercent As Double) As void
Parameters
horizontalPercent
System.Double System.Double System.Double

The horizontal position as a percentage of the content area's total range. Pass NoScroll if the control cannot be scrolled in this direction.

verticalPercent
System.Double System.Double System.Double

The vertical position as a percentage of the content area's total range. Pass NoScroll if the control cannot be scrolled in this direction.

Attributes

See Also