ItemsSourceView.KeyFromIndex(Int32) 메서드

정의

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

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

public:
 virtual Platform::String ^ KeyFromIndex(int index) = KeyFromIndex;
winrt::hstring KeyFromIndex(int const& index);
public string KeyFromIndex(int index);
Public Function KeyFromIndex (index As Integer) As String

매개 변수

index
Int32

int

키를 가져올 항목의 인덱스입니다.

반환

String

Platform::String

winrt::hstring

지정된 인덱스에서 항목의 고유 식별자(키)입니다.

설명

이 메서드를 호출하기 전에 HasKeyIndexMapping 속성이 true 인지 확인합니다. 데이터 원본이 고유 ID(키 값)를 지원하지 않는 경우 이 메서드는 NotImplementedException을 발생합니다.

Count 속성을 사용하여 유효한 인덱스가 전달되고 있는지 확인합니다.

적용 대상