ItemsSourceView 클래스

정의

지정된 ItemsSource 개체와 ItemsRepeater 컨트롤 간의 지원되는 상호 작용에 대한 표준화된 보기를 나타냅니다.

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

/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class ItemsSourceView : INotifyCollectionChanged
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class ItemsSourceView : INotifyCollectionChanged
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public class ItemsSourceView : INotifyCollectionChanged
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public class ItemsSourceView : INotifyCollectionChanged
Public Class ItemsSourceView
Implements INotifyCollectionChanged
상속
Object IInspectable ItemsSourceView
특성
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute ContractVersionAttribute
구현

예제

자세한 정보, 디자인 지침 및 코드 예제는 항목 반복기를 참조하세요.

WinUI 2 갤러리 앱에는 대부분의 WinUI 2 컨트롤, 특징, 기능의 대화형 예제가 포함되어 있습니다. Microsoft Store에서 앱을 다운로드하거나 GitHub에서 소스 코드를 가져오세요.

설명

ItemsRepeater로 작업하도록 작성된 구성 요소는 ItemsSource의 정규화된 보기를 제공하기 때문에 ItemsSourceView를 통해 ItemsSource를 사용해야 합니다. 이렇게 하면 각 구성 요소가 원본이 IEnumerable, IVector 또는 다른 항목인지 알 필요가 없습니다.

생성자

ItemsSourceView(Object)

지정된 데이터 원본에 대한 ItemsSourceView 클래스의 새 인스턴스를 초기화합니다.

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

속성

Count

컬렉션의 항목 수를 가져옵니다.

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

HasKeyIndexMapping

항목 원본이 각 항목에 대해 고유 키를 제공할 수 있는지 여부를 나타내는 값을 가져옵니다.

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

메서드

GetAt(Int32)

지정된 인덱스에서 항목을 검색합니다.

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

IndexFromKey(String)

지정된 고유 식별자(키)가 있는 항목의 인덱스를 검색합니다.

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

IndexOf(Object)

지정된 항목의 인덱스를 검색합니다.

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

KeyFromIndex(Int32)

지정된 인덱스에 있는 항목의 고유 식별자(키)를 검색합니다.

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

이벤트

CollectionChanged

변경 이유와 변경된 항목을 나타내기 위해 컬렉션이 변경된 경우에 발생합니다.

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

적용 대상

추가 정보