Condividi tramite


XamlDirect.RemoveFromCollectionAt(IXamlDirectObject, UInt32) Metodo

Definizione

Tenta di rimuovere un valore dall'insieme IXamlDirectObject in corrispondenza dell'indice specificato.

public:
 virtual void RemoveFromCollectionAt(IXamlDirectObject ^ xamlDirectObject, unsigned int index) = RemoveFromCollectionAt;
void RemoveFromCollectionAt(IXamlDirectObject const& xamlDirectObject, uint32_t const& index);
public void RemoveFromCollectionAt(IXamlDirectObject xamlDirectObject, uint index);
function removeFromCollectionAt(xamlDirectObject, index)
Public Sub RemoveFromCollectionAt (xamlDirectObject As IXamlDirectObject, index As UInteger)

Parametri

xamlDirectObject
IXamlDirectObject

Fa riferimento all'insieme IXamlDirectObject specifico.

index
UInt32

unsigned int

uint32_t

Fa riferimento all'indice nella raccolta in cui deve essere rimosso il valore.

Esempio

L'esempio seguente mostra come rimuovere un valore da un indice specifico usando le API XamlDirect .

XamlDirect xd = XamlDirect.GetDefault();

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

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

xd.RemoveFromCollectionAt(childrenCollection, 0);
XamlDirect^ xd = XamlDirect::GetDefault();

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

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

xd->RemoveFromCollectionAt(childrenCollection, 0);

Si applica a

Vedi anche