UIElementCollection.InsertAt(UInt32, UIElement) Method

Definition

Inserts the specified item at the specified index.

Equivalent WinUI method: Microsoft.UI.Xaml.Controls.UIElementCollection.InsertAt.

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

Parameters

index
UInt32

The index at which to set the value.

value
UIElement

The value to set.

Implements

Remarks

InsertAt expands the collection and moves all subsequent index items by one. In contrast, SetAt replaces the item at the index, and the collection count remains the same.

If you are programming using C# or Microsoft Visual Basic, see Insert.

Applies to