XamlDirect.GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32) XamlDirect.GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32) XamlDirect.GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32) XamlDirect.GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32) Method

Definition

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

public : IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject xamlDirectObject, unsigned int index)
IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject xamlDirectObject, uint32_t index) const;
public IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject xamlDirectObject, UInt32 index)
Public Function GetXamlDirectObjectFromCollectionAt(xamlDirectObject As IXamlDirectObject, index As UInt32) As IXamlDirectObject

Parameters

xamlDirectObject
IXamlDirectObject IXamlDirectObject

Refers to the specific IXamlDirectObject collection.

index
UInt32 UInt32

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