QuickGrid<TGridItem>.ScrollToItemAsync(Int32, CancellationToken) 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.
Scrolls the virtualized grid so the row at itemIndex is aligned to the top of the
scrollable area. Only has an effect when Virtualize is true.
public System.Threading.Tasks.Task ScrollToItemAsync(int itemIndex, System.Threading.CancellationToken cancellationToken = default);
member this.ScrollToItemAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ScrollToItemAsync (itemIndex As Integer, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- itemIndex
- Int32
The zero-based index of the row to scroll to.
- cancellationToken
- CancellationToken
A token that lets the caller request cancellation.
Returns
A Task that completes when the target is aligned or superseded by another call.
Remarks
Each call cancels any previously-running ScrollToItemAsync(Int32, CancellationToken) (last call wins). Must be called on the renderer's synchronization context; background-thread callers should wrap with InvokeAsync(Func<Task>).