ItemsView.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
| Name | Description |
|---|---|
| ScrollTo(Int32, Int32, ScrollToPosition, Boolean) |
Scrolls the items view to the item at the specified index. |
| ScrollTo(Object, Object, ScrollToPosition, Boolean) |
Scrolls the items view to the specified data item. |
ScrollTo(Int32, Int32, ScrollToPosition, Boolean)
- Source:
- ItemsView.cs
- Source:
- ItemsView.cs
- Source:
- ItemsView.cs
Scrolls the items view to the item at the specified index.
public void ScrollTo(int index, int groupIndex = -1, Microsoft.Maui.Controls.ScrollToPosition position = Microsoft.Maui.Controls.ScrollToPosition.MakeVisible, bool animate = true);
member this.ScrollTo : int * int * Microsoft.Maui.Controls.ScrollToPosition * bool -> unit
Public Sub ScrollTo (index As Integer, Optional groupIndex As Integer = -1, Optional position As ScrollToPosition = Microsoft.Maui.Controls.ScrollToPosition.MakeVisible, Optional animate As Boolean = true)
Parameters
- index
- Int32
The zero-based index of the item to scroll to.
- groupIndex
- Int32
The zero-based index of the group containing the item, or -1 if not grouped.
- position
- ScrollToPosition
The position where the item should appear in the visible area after scrolling.
- animate
- Boolean
true to animate the scroll; false to jump immediately.
Applies to
ScrollTo(Object, Object, ScrollToPosition, Boolean)
- Source:
- ItemsView.cs
- Source:
- ItemsView.cs
- Source:
- ItemsView.cs
Scrolls the items view to the specified data item.
public void ScrollTo(object item, object group = default, Microsoft.Maui.Controls.ScrollToPosition position = Microsoft.Maui.Controls.ScrollToPosition.MakeVisible, bool animate = true);
member this.ScrollTo : obj * obj * Microsoft.Maui.Controls.ScrollToPosition * bool -> unit
Public Sub ScrollTo (item As Object, Optional group As Object = Nothing, Optional position As ScrollToPosition = Microsoft.Maui.Controls.ScrollToPosition.MakeVisible, Optional animate As Boolean = true)
Parameters
- item
- Object
The data item to scroll to.
- group
- Object
The group object containing the item, or null if not grouped.
- position
- ScrollToPosition
The position where the item should appear in the visible area after scrolling.
- animate
- Boolean
true to animate the scroll; false to jump immediately.