Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 2.56 KB

itemsrepeaterscrollhost.md

File metadata and controls

51 lines (34 loc) · 2.56 KB
-api-id -api-type
T:Microsoft.UI.Xaml.Controls.ItemsRepeaterScrollHost
winrt class

Microsoft.UI.Xaml.Controls.ItemsRepeaterScrollHost

-description

A helper to coordinate interaction between the ItemsRepeater and ScrollViewer. Use the ItemsRepeaterScrollHost if your app will run on versions of Windows prior Windows 10 1809 (Build 17763). If your app will only run on versions of Windows 1809 or higher, there is no need to use this control.

-remarks

ItemsRepeaterScrollHost is a helper class that you can use to wrap a ScrollViewer and provide functionality of new APIs on earlier versions of Windows 10.

Starting in Windows 10, version 1809 (SDK 17763), ScrollViewer has properties that coordinate interaction between an ItemsRepeater and the ScrollViewer. If your app targets versions of Windows 10 prior to version 1809 (SDK 17763), wrap your ScrollViewer in an ItemsRepeaterScrollHost to provide the functionality of these APIs. The properties on ItemsRepeaterScrollHost replicate the same functionality and behavior as the like-named ones found on on ScrollViewer.

If the minimum target version of your app is Windows 10, version 1809 (SDK 17763) or later, there is no need to use this control.

-see-also

-examples

Tip

For more info, design guidance, and code examples, see ItemsRepeater.

[!div class="nextstepaction"] Open the WinUI 3 Gallery app and see the ItemsRepeater in action.

The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.

This example shows a scrollable list of people.

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls">

    <muxc:ItemsRepeaterScrollHost>
        <ScrollViewer>
            <muxc:ItemsRepeater ItemsSource='{x:Bind PeopleCollection}' />
        </ScrollViewer>
    </muxc:ItemsRepeaterScrollHost> 
    
</Page