XRPropertyBag (Compact 2013)

3/28/2014

This C++ class provides an intermediate base class for a custom implementation of a property bag for a data source object.

Syntax

class __declspec(novtable) __declspec(uuid("{F604D973-DAFB-434f-B7A2-6F3B305427F0}")) 
XRPropertyBag : public IXRPropertyBag

Inheritance Hierarchy

IXRPropertyBag

     XRPropertyBag

Members

The following tables list any methods and fields that belong to this class.

Methods

Methods

Description

XRPropertyBag.GetPropertyChangedEvent(IXRCustomEvent <XRPropertyChangedCustomEventArgs,IXRPropertyBag>**)

Obtains the PropertyChanged event.

Fields

Fields

Description

m_pPropertyChangedEvent

An IXRCustomEvent object that represents the PropertyChanged event.

Remarks

Use XRPropertyBag for custom implementations of property bags for data source objects in XAML for Windows Embedded.

XRPropertyBag provides the following functionality additional to its superclass IXRPropertyBag:

  • Provides an implementation of the PropertyChanged custom event and a GetPropertyChangedEvent method that applications use to access the custom event to either raise the event or obtain the event’s data.
  • Provides an interface map by using the BEGIN_QI_MAP and END_QI_MAP macros so that you can:

When you use XRPropertyBag, you still have to implement your own GetValue and SetValue methods.

If you prefer to use a property bag that works by default with the iXRPropertyBinding data source property implementation and provides GetValue and SetValue methods, use TPropertyBag<Derived> instead.

Example

The following example code shows the interface map for XRPropertyBag.

Important

For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.

class __declspec(novtable) __declspec(uuid("{F604D973-DAFB-434f-B7A2-6F3B305427F0}")) 
XRPropertyBag : public IXRPropertyBag
{
    BEGIN_QI_MAP()
        QI_MAP_INTERFACE(XRPropertyBag)
        QI_MAP_INTERFACE(IXRPropertyBag)
    END_QI_MAP()

Requirements

Header

XRPropertyBag.h

See Also

Reference

Classes for Populating UI Elements with Data
TPropertyBag<Derived>
IXRPropertyBag