IXamlDirect.GetXamlDirectObjectFromCollectionAt(Object, UInt32) 메서드

정의

지정된 IXamlDirect 컬렉션의 지정된 인덱스에 있는 IXamlDirect 항목을 반환합니다.

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

public:
 Platform::Object ^ GetXamlDirectObjectFromCollectionAt(Platform::Object ^ xamlDirectObject, unsigned int index);
IInspectable GetXamlDirectObjectFromCollectionAt(IInspectable const& xamlDirectObject, uint32_t const& index);
public object GetXamlDirectObjectFromCollectionAt(object xamlDirectObject, uint index);
Public Function GetXamlDirectObjectFromCollectionAt (xamlDirectObject As Object, index As UInteger) As Object

매개 변수

xamlDirectObject
Object

Platform::Object

IInspectable

특정 IXamlDirect 컬렉션을 참조합니다.

index
UInt32

unsigned int

uint32_t

가져올 항목 컬렉션의 인덱스를 참조합니다.

반환

Object

Platform::Object

IInspectable

컬렉션의 지정된 인덱 스에 있는 IXamlDirect 항목을 반환합니다.

예제

다음 예제에서는 컬렉션의 지정된 인덱스에서 IXamlDirect 항목에 액세스하는 방법을 보여 있습니다.

XamlDirect xd = XamlDirect.GetDefault();

IXamlDirect relativePanel = xd.CreateInstance(XamlTypeIndex.RelativePanel);

IXamlDirect childrenCollection = xd.GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex.Panel_Children);

IXamlDirect first = xd.GetXamlDirectObjectFromCollectionAt(childrenCollection, 0);
XamlDirect^ xd = XamlDirect::GetDefault();

IXamlDirect^ relativePanel = xd->CreateInstance(XamlTypeIndex::RelativePanel);

IXamlDirect^ childrenCollection = xd->GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex::Panel_Children);

IXamlDirect^ first = xd->GetXamlDirectObjectFromCollectionAt(childrenCollection, 0);

적용 대상