ListView.ScrollTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ScrollTo(Object, Object, ScrollToPosition, Boolean) |
Scrolls the ListView to the |
ScrollTo(Object, ScrollToPosition, Boolean) |
Scrolls the ListView to the |
ScrollTo(Object, Object, ScrollToPosition, Boolean)
Scrolls the ListView to the item
in the group
public void ScrollTo (object item, object group, Xamarin.Forms.ScrollToPosition position, bool animated);
member this.ScrollTo : obj * obj * Xamarin.Forms.ScrollToPosition * bool -> unit
Parameters
- item
- System.Object
The item from your ItemsSource to scroll to.
- group
- System.Object
The group from your ItemsSource to scroll to.
- position
- ScrollToPosition
How the item should be positioned on screen.
- animated
- System.Boolean
Whether or not the scroll should be animated.
Exceptions
position
contains an invalid value for ScrollToPosition.
IsGroupingEnabled is false
.
Remarks
A linear search is done for the item, so if the same reference appears multiple times in the group
, the first item will be scrolled to. The same item in a different group will be ignored.
Applies to
ScrollTo(Object, ScrollToPosition, Boolean)
Scrolls the ListView to the item
.
public void ScrollTo (object item, Xamarin.Forms.ScrollToPosition position, bool animated);
member this.ScrollTo : obj * Xamarin.Forms.ScrollToPosition * bool -> unit
Parameters
- item
- System.Object
The item from your ItemsSource to scroll to.
- position
- ScrollToPosition
How the item should be positioned on screen.
- animated
- System.Boolean
Whether or not the scroll should be animated.
Exceptions
position
contains an invalid value for ScrollToPosition.
Remarks
A linear search is done for the item, so if the same reference appears multiple times in the list, the first item will be scrolled to. This includes if grouping is enabled.