Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.68 KB

listviewbase_scrollintoview_2024050476.md

File metadata and controls

33 lines (22 loc) · 1.68 KB
-api-id -api-type
M:Windows.UI.Xaml.Controls.ListViewBase.ScrollIntoView(System.Object,Windows.UI.Xaml.Controls.ScrollIntoViewAlignment)
winrt method

Windows.UI.Xaml.Controls.ListViewBase.ScrollIntoView

-description

Scrolls the list to bring the specified data item into view with the specified alignment.

-parameters

-param item

The data item to bring into view.

-param alignment

An enumeration value that specifies whether the item uses Default or Leading alignment.

-remarks

You use the ScrollIntoView method to bring an item into view when the ListViewBase control is not used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is used in a SemanticZoom, use the MakeVisible method instead.

When the contents of the ItemsSource collection changes, particularly if many items are added to or removed from the collection, you might need to call UpdateLayout prior to calling ScrollIntoView for the specified item to scroll into the viewport.

-examples

You can find a full sample focusing around how to use ScrollIntoView here.

-see-also

ScrollIntoView(Object), MakeVisible