ListViewPersistenceHelper ListViewPersistenceHelper ListViewPersistenceHelper ListViewPersistenceHelper Class

Definition

Represents a helper class to save and retrieve the relative scroll position of the ListView.

public : sealed class ListViewPersistenceHelper : IListViewPersistenceHelperpublic sealed class ListViewPersistenceHelper : IListViewPersistenceHelperPublic NotInheritable Class ListViewPersistenceHelper Implements IListViewPersistenceHelper// This API is not available in Javascript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

If the ItemsStackPanel.ItemsUpdatingScrollMode property is set to KeepItemsInView, ListViewPersistenceHelper attempts to restore the scroll position using the key of the first visible item. If ItemsUpdatingScrollMode is KeepLastItemInView, it attempts to restore the scroll position using the key of the last visible item.

Methods

GetRelativeScrollPosition(ListViewBase, ListViewItemToKeyHandler) GetRelativeScrollPosition(ListViewBase, ListViewItemToKeyHandler) GetRelativeScrollPosition(ListViewBase, ListViewItemToKeyHandler) GetRelativeScrollPosition(ListViewBase, ListViewItemToKeyHandler)

Retrieves the relative scroll position of the ListView.

public : static PlatForm::String GetRelativeScrollPosition(ListViewBase listViewBase, ListViewItemToKeyHandler itemToKeyHandler)public static string GetRelativeScrollPosition(ListViewBase listViewBase, ListViewItemToKeyHandler itemToKeyHandler)Public Static Function GetRelativeScrollPosition(listViewBase As ListViewBase, itemToKeyHandler As ListViewItemToKeyHandler) As string// This API is not available in Javascript.
Parameters
listViewBase
ListViewBase ListViewBase ListViewBase ListViewBase

The ListView object.

itemToKeyHandler
ListViewItemToKeyHandler ListViewItemToKeyHandler ListViewItemToKeyHandler ListViewItemToKeyHandler

The method that will handle the retrieval of the item key.

Returns
PlatForm::String string string string

The relative scroll position of the ListView.

SetRelativeScrollPositionAsync(ListViewBase, String, ListViewKeyToItemHandler) SetRelativeScrollPositionAsync(ListViewBase, String, ListViewKeyToItemHandler) SetRelativeScrollPositionAsync(ListViewBase, String, ListViewKeyToItemHandler) SetRelativeScrollPositionAsync(ListViewBase, String, ListViewKeyToItemHandler)

Begins an asynchronous action to set the relative scroll position of the ListView.

public : static IAsyncAction SetRelativeScrollPositionAsync(ListViewBase listViewBase, PlatForm::String relativeScrollPosition, ListViewKeyToItemHandler keyToItemHandler)public static IAsyncAction SetRelativeScrollPositionAsync(ListViewBase listViewBase, String relativeScrollPosition, ListViewKeyToItemHandler keyToItemHandler)Public Static Function SetRelativeScrollPositionAsync(listViewBase As ListViewBase, relativeScrollPosition As String, keyToItemHandler As ListViewKeyToItemHandler) As IAsyncAction// This API is not available in Javascript.
Parameters
listViewBase
ListViewBase ListViewBase ListViewBase ListViewBase

The ListView.

relativeScrollPosition
PlatForm::String String String String

The relative scroll position of the ListView.

keyToItemHandler
ListViewKeyToItemHandler ListViewKeyToItemHandler ListViewKeyToItemHandler ListViewKeyToItemHandler

The method that will handle the retrieval of the ListView item given the key.

Returns