FREE TRIAL

|

☀
☾

Scroller.ScrollToIndex

ScrollToIndex(int)

Scrolls to the child item at the provided index index and applies a brief "after scroll" animation.

Remarks

If this.ActiveAndEnabled == false, this call won't do anything.

Declaration
public void ScrollToIndex(int index)
Parameters
Type Name Description
int index

The index of the child in the range [0, ScrollableChildCount) to scroll to

Exceptions
Type Condition
System.IndexOutOfRangeException

if index < 0 || index >= ScrollableChildCount

System.InvalidOperationException

if UIBlock.AutoLayout.Axis == Axis.None

ScrollToIndex(int, bool)

Scrolls to the child item at the provided index index and optionally applies a brief "after scroll" animation.

Remarks

If this.ActiveAndEnabled == false, this call won't do anything.

Declaration
public void ScrollToIndex(int index, bool animate)
Parameters
Type Name Description
int index

The index of the child in the range [0, ScrollableChildCount) to scroll to

bool animate

Applies an "after scroll" animation when true. Jumps to the position without animating when false.

Exceptions
Type Condition
System.IndexOutOfRangeException

if index < 0 || index >= ScrollableChildCount

System.InvalidOperationException

if UIBlock.AutoLayout.Axis == Axis.None

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC