Compartilhar via


IXRNotifyCollectionChanged (Compact 2013)

3/28/2014

This class provides a method that obtains the CollectionChanged event.

Syntax

class IXRNotifyCollectionChanged : public IUnknown

Inheritance Hierarchy

IUnknown

    IXRNotifyCollectionChanged

Methods

Method

Description

IXRNotifyCollectionChanged::GetCollectionChangedEvent

Retrieves the CollectionChanged custom event defined in a collection object. The collection object must raise this event when the collection changes.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

Implement this class on a custom collection object. Then, use this class to update the user interface when the collection changes. The action that caused a collection to change is defined in the XRCollectionChangeAction enumeration, which you can retrieve from the CollectionChanged event data. An IXRItemsControl registers a CollectionChanged event handler.

When you create a class instance, use an IXRNotifyCollectionChangedPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Populating UI Elements with Data
XRCollectionChangedCustomEventArgs
XRObservableCollection<ItemType>
XRObservableCollection.CreateInstance(XRObservableCollection * *)
XRObservableCollection.OnCollectionChanged(XRCollectionChangedCustomEventArgs *)