Compartir a través de


XRObservableCollection.ClearItemsImpl (Compact 2013)

3/28/2014

This protected method implements collection operations for removing all items from the collection and invokes XRObservableCollection.OnCollectionChanged(XRCollectionChangedCustomEventArgs *) to send an event notification that the collection has changed.

Syntax

HRESULT STDMETHODCALLTYPE ClearItemsImpl(void)

Parameters

None

Return Value

The following table shows the possible return values.

Value

Description

S_OK

The method was successful.

E_BUSY

The collection is currently being updated.

Remarks

This method calls XRObservableCollection.OnCollectionChanged(XRCollectionChangedCustomEventArgs *) to raise the CollectionChanged event.

The inherited method _XRValueCollectionBaseT.Clear internally calls ClearItemsImpl to execute the functionality that clears all items in the collection. You can override the ClearItemsImpl method to provide a customized implementation that clears all items in the collection.

Because XRObservableCollection.ClearItemsImpl is a protected member, an instance of XRObservableCollection<ItemType> cannot directly access the XRObservableCollection.ClearItemsImpl method.

If you derive a new class from XRObservableCollection<ItemType> that uses either public or protected access modifiers, you can override this method in the new class.

Requirements

Header

XRCollection.h

See Also

Reference

XRObservableCollection<ItemType>