Skip to main content

IScrollProvider Interface

Definition​

Assembly:Avalonia.Controls
Package:Avalonia

Exposes methods and properties to support access by a UI Automation client to a control that acts as a scrollable container for a collection of child objects.

public interface IScrollProvider

Methods​

NameDescription
ScrollScrolls the visible region of the content area horizontally and vertically.
SetScrollPercentSets the horizontal and vertical scroll position as a percentage of the total content area within the control.

Scroll Method​

Scrolls the visible region of the content area horizontally and vertically.

public void Scroll(Avalonia.Automation.Provider.ScrollAmount horizontalAmount, Avalonia.Automation.Provider.ScrollAmount verticalAmount)

Parameters​

horizontalAmount Avalonia.Automation.Provider.ScrollAmount

The horizontal increment specific to the control.

verticalAmount Avalonia.Automation.Provider.ScrollAmount

The vertical increment specific to the control.

Remarks​

  • WindowsIScrollProvider.Scroll
  • macOSNo mapping.

SetScrollPercent Method​

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)

Parameters​

horizontalPercent double

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

verticalPercent double

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

Remarks​

  • WindowsIScrollProvider.SetScrollPercent
  • macOSNo mapping.

Properties​

NameDescription
HorizontallyScrollableGets a value that indicates whether the control can scroll horizontally.
HorizontalScrollPercentGets the current horizontal scroll position.
HorizontalViewSizeGets the current horizontal view size.
VerticallyScrollableGets a value that indicates whether the control can scroll vertically.
VerticalScrollPercentGets the current vertical scroll position.
VerticalViewSizeGets the vertical view size.

HorizontallyScrollable Property​

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

public bool HorizontallyScrollable { get; set; }

Remarks​

  • WindowsIScrollProvider.HorizontallyScrollable
  • macOSNo mapping.

HorizontalScrollPercent Property​

Gets the current horizontal scroll position.

public double HorizontalScrollPercent { get; set; }

Remarks​

  • WindowsIScrollProvider.HorizontalScrollPercent
  • macOSNo mapping.

HorizontalViewSize Property​

Gets the current horizontal view size.

public double HorizontalViewSize { get; set; }

Remarks​

  • WindowsIScrollProvider.HorizontalViewSize
  • macOSNo mapping.

VerticallyScrollable Property​

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

public bool VerticallyScrollable { get; set; }

Remarks​

  • WindowsIScrollProvider.VerticallyScrollable
  • macOSNo mapping.

VerticalScrollPercent Property​

Gets the current vertical scroll position.

public double VerticalScrollPercent { get; set; }

Remarks​

  • WindowsIScrollProvider.VerticalScrollPercent
  • macOSNo mapping.

VerticalViewSize Property​

Gets the vertical view size.

public double VerticalViewSize { get; set; }

Remarks​

  • WindowsIScrollProvider.VerticalViewSize
  • macOSNo mapping.