Compartilhar via


XamlDirect.RemoveFromCollectionAt(IXamlDirectObject, UInt32) Método

Definição

Tenta remover um valor da coleção IXamlDirectObject no índice especificado.

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)

Parâmetros

xamlDirectObject
IXamlDirectObject

Refere-se à coleção IXamlDirectObject específica.

index
UInt32

unsigned int

uint32_t

Refere-se ao índice na coleção em que o valor deve ser removido.

Exemplos

O exemplo a seguir mostra como remover um valor de um índice específico usando APIs 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);

Aplica-se a

Confira também