ItemsRepeaterScrollHost 클래스

정의

ItemsRepeaterScrollViewer 간의 상호 작용을 조정하는 도우미입니다. 앱이 1809(빌드 17763)Windows 10 이전 버전의 Windows에서 실행되는 경우 ItemsRepeaterScrollHost를 사용합니다. 앱이 Windows 1809 이상 버전에서만 실행되는 경우 이 컨트롤을 사용할 필요가 없습니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

public ref class ItemsRepeaterScrollHost sealed : FrameworkElement
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Windows.Foundation.Metadata.Activatable(1)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="ScrollViewer")]
class ItemsRepeaterScrollHost final : FrameworkElement
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="ScrollViewer")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class ItemsRepeaterScrollHost final : FrameworkElement
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.Activatable(1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="ScrollViewer")]
public sealed class ItemsRepeaterScrollHost : FrameworkElement
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="ScrollViewer")]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public sealed class ItemsRepeaterScrollHost : FrameworkElement
Public NotInheritable Class ItemsRepeaterScrollHost
Inherits FrameworkElement
상속
ItemsRepeaterScrollHost
특성

예제

자세한 정보, 디자인 지침 및 코드 예제는 ItemsRepeater를 참조하세요.

WinUI 3 갤러리WinUI 2 갤러리 앱에는 대부분의 WinUI 3 및 WinUI 2 컨트롤, 특징, 기능의 대화형 예제가 포함되어 있습니다.

이미 설치된 경우 WinUI 3 갤러리 또는 WinUI 2 갤러리 링크를 클릭하여 갤러리를 엽니다.

설치되지 않은 경우 Microsoft Store에서 WinUI 3 갤러리WinUI 2 갤러리를 다운로드할 수 있습니다.

GitHub에서 두 갤러리의 소스 코드를 가져올 수도 있습니다(WinUI 3는 main 분기, WinUI 2는 winui2 분기 사용).

이 예제에서는 스크롤 가능한 사용자 목록을 보여줍니다.

<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

설명

ItemsRepeaterScrollHost는 ScrollViewer를 래핑하고 이전 버전의 Windows 10 새 API의 기능을 제공하는 데 사용할 수 있는 도우미 클래스입니다.

Windows 10, 버전 1809(SDK 17763)부터 ScrollViewer에는 ItemsRepeater와 ScrollViewer 간의 상호 작용을 조정하는 속성이 있습니다. 앱이 버전 1809(SDK 17763) 이전 버전의 Windows 10 대상으로 하는 경우 ScrollViewer를 ItemsRepeaterScrollHost에 래핑하여 이러한 API의 기능을 제공합니다. ItemsRepeaterScrollHost의 속성은 ScrollViewer에 있는 것과 동일한 기능 및 동작을 복제합니다.

앱의 최소 대상 버전이 Windows 10, 버전 1809(SDK 17763) 이상인 경우 이 컨트롤을 사용할 필요가 없습니다.

생성자

ItemsRepeaterScrollHost()

ItemsRepeaterScrollHost 클래스의 새 인스턴스를 초기화합니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

속성

CurrentAnchor

스크롤 앵커링에 사용할 현재 선택된 앵커 요소입니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

HorizontalAnchorRatio

뷰포트와 관련하여 ScrollViewer 앵커 지점 의 가로 위치를 결정합니다. 기본적으로 ScrollViewer는 앵커 지점에 가장 가까운 뷰포트의 요소를 식별하여 요소를 CurrentAnchor 로 선택합니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

ScrollViewer

호스트할 ScrollViewer 를 가져오거나 설정합니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

VerticalAnchorRatio

뷰포트와 관련하여 ScrollViewer 앵커 지점 의 세로 위치를 결정합니다. 기본적으로 ScrollViewer는 앵커 지점에 가장 가까운 뷰포트의 요소를 식별하여 요소를 CurrentAnchor 로 선택합니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

적용 대상