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
indexintThe item's index.
alignVirtualListAlignWhere the item is placed in the viewport.
Exceptions
- ArgumentOutOfRangeException
indexis 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
indexintThe item's index.
alignVirtualListAlignWhere the item is placed in the viewport.
behaviorVirtualListScrollBehaviorWhether the list jumps or animates there.
Exceptions
- ArgumentOutOfRangeException
indexis outside the mounted list's items.