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

Definition

Tries to remove a value from the IXamlDirectObject collection at the specified index.

public : void RemoveFromCollectionAt(IXamlDirectObject xamlDirectObject, unsigned int index)
void RemoveFromCollectionAt(IXamlDirectObject xamlDirectObject, uint32_t index) const;
public void RemoveFromCollectionAt(IXamlDirectObject xamlDirectObject, UInt32 index)
Public Sub RemoveFromCollectionAt(xamlDirectObject As IXamlDirectObject, index As UInt32)

Parameters

xamlDirectObject
IXamlDirectObject IXamlDirectObject

Refers to the specific IXamlDirectObject collection.

index
UInt32 UInt32

Refers to the index in the collection where the value must be removed.

Examples

The following example shows how to remove a value from a specific index using XamlDirect APIs.

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