XamlDirect.RemoveFromCollectionAt(IXamlDirectObject, UInt32) メソッド

定義

指定したインデックス位置にある IXamlDirectObject コレクションから値の削除を試みます。

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)

パラメーター

xamlDirectObject
IXamlDirectObject

特定の IXamlDirectObject コレクションを参照します。

index
UInt32

unsigned int

uint32_t

値を削除する必要があるコレクション内のインデックスを参照します。

次の例は、 XamlDirect API を使用して特定のインデックスから値を削除する方法を示しています。

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

適用対象

こちらもご覧ください