다음을 통해 공유


XamlDirect.GetXamlDirectObjectFromCollectionAt 메서드

정의

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

public:
 virtual IXamlDirectObject ^ GetXamlDirectObjectFromCollectionAt(IXamlDirectObject ^ xamlDirectObject, unsigned int index) = GetXamlDirectObjectFromCollectionAt;
IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject const& xamlDirectObject, uint32_t const& index);
public IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject xamlDirectObject, uint index);
function getXamlDirectObjectFromCollectionAt(xamlDirectObject, index)
Public Function GetXamlDirectObjectFromCollectionAt (xamlDirectObject As IXamlDirectObject, index As UInteger) As IXamlDirectObject

매개 변수

xamlDirectObject
IXamlDirectObject

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

index
UInt32

unsigned int

uint32_t

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

반환

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

예제

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

XamlDirect xd = XamlDirect.GetDefault();

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

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

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

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

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

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

적용 대상