Condividi tramite


XamlDirect.GetXamlDirectObjectFromCollectionAt Metodo

Definizione

Restituisce l'elemento IXamlDirectObject nell'indice specificato dall'insieme IXamlDirectObject specificato.

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

Parametri

xamlDirectObject
IXamlDirectObject

Si riferisce all'insieme IXamlDirectObject specifico.

index
UInt32

unsigned int

uint32_t

Fa riferimento all'indice nella raccolta dell'elemento da ottenere.

Restituisce

Restituisce l'elemento IXamlDirectObject nell'indice specificato della raccolta.

Esempio

Nell'esempio seguente viene illustrato come accedere a un elemento IXamlDirectObject nell'indice specificato di una raccolta.

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

Si applica a