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 |
System.InvalidOperationException | if |
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 |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | if |
System.InvalidOperationException | if |