Share via


XamlDirect.RemoveFromCollectionAt(IXamlDirectObject, UInt32) Methode

Definition

Versucht, einen Wert aus der IXamlDirectObject-Auflistung am angegebenen Index zu entfernen.

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)

Parameter

xamlDirectObject
IXamlDirectObject

Bezieht sich auf die spezifische IXamlDirectObject-Auflistung .

index
UInt32

unsigned int

uint32_t

Bezieht sich auf den Index in der Auflistung, in der der Wert entfernt werden muss.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie mithilfe von XamlDirect-APIs einen Wert aus einem bestimmten Index entfernen.

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

Gilt für:

Weitere Informationen