Share via


XamlDirect.GetXamlDirectObjectFromCollectionAt Method

Definition

Returns the IXamlDirectObject item at the specified index from the specified IXamlDirectObject collection.

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

Parameters

xamlDirectObject
IXamlDirectObject

Refers to the specific IXamlDirectObject collection.

index
UInt32

unsigned int

uint32_t

Refers to the index in the collection of the item to get.

Returns

Returns the IXamlDirectObject item at the specified index of the collection.

Examples

The following example shows how to access an IXamlDirectObject item at the specified index of a collection.

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);

Applies to