UIElementCollection.InsertAt(UInt32, UIElement) 方法

定義

在指定的索引處插入指定的專案。

public:
 virtual void InsertAt(unsigned int index, UIElement ^ value) = IVector<UIElement ^>::InsertAt;
void InsertAt(uint32_t const& index, UIElement const& value);
public void InsertAt(uint index, UIElement value);
function insertAt(index, value)
Public Sub InsertAt (index As UInteger, value As UIElement)

參數

index
UInt32

unsigned int

uint32_t

要在其中設定值的索引。

value
UIElement

要設定的值。

實作

M:Windows.Foundation.Collections.IVector1.InsertAt(System.UInt32,0) M:Windows.Foundation.Collections.IVector1.InsertAt(unsigned int,0) M:Windows.Foundation.Collections.IVector1.InsertAt(uint32_t,0)

備註

InsertAt 會展開集合,並將所有後續的索引項目目移動一個。 相反地, SetAt 會取代索引上的專案,而且集合計數維持不變。

如果您是使用 C# 或 Microsoft Visual Basic 進行程式設計,請參閱 Insert

適用於