Table of Contents

Method ScrollToItem

Namespace
Velvet
Assembly
Velvet.Docs.dll

ScrollToItem(int, VirtualListAlign)

Scrolls the list so the item at index sits where align puts it in the viewport the list's last layout gave it. A disposed handle does nothing.

public void ScrollToItem(int index, VirtualListAlign align = VirtualListAlign.Auto)

Parameters

index int

The item's index.

align VirtualListAlign

Where the item is placed in the viewport.

Exceptions

ArgumentOutOfRangeException

index is outside the mounted list's items.

ScrollToItem(int, VirtualListAlign, VirtualListScrollBehavior)

Scrolls to an item using the requested movement behavior. A disposed handle does nothing.

public void ScrollToItem(int index, VirtualListAlign align, VirtualListScrollBehavior behavior)

Parameters

index int

The item's index.

align VirtualListAlign

Where the item is placed in the viewport.

behavior VirtualListScrollBehavior

Whether the list jumps or animates there.

Exceptions

ArgumentOutOfRangeException

index is outside the mounted list's items.