UIElementCollection.ReplaceAll(UIElement[]) Method

Definition

Initially clears the collection, then inserts the provided array as new items.

public:
 virtual void ReplaceAll(Platform::Array <UIElement ^> ^ items) = IVector<UIElement ^>::ReplaceAll;
void ReplaceAll(winrt::array_view <UIElement const&> const& items);
public void ReplaceAll(UIElement[] items);
function replaceAll(items)
Public Sub ReplaceAll (items As UIElement())

Parameters

items
UIElement[]

The new collection items.

Implements

Remarks

For implementations that track a "changed" event, the initial reset fires an event, but the items added do not fire discrete per-item events.

If you are programming using C# or Microsoft Visual Basic, there is no single-call equivalent to ReplaceAll. Use Clear and then successive calls to Add.

Applies to

See also