PFN_PROPERTY_CHANGE (Windows Embedded CE 6.0)
1/6/2010
This callback function is defined by the application. Silverlight for Windows Embedded calls this function when the value of a dependency property or of an attached property changes. The PFN_PROPERTY_CHANGE type defines a pointer to this callback function.
Syntax
typedef void (CALLBACK* PFN_PROPERTY_CHANGE)(
IXRDependencyObject* pControl,
XRValue* pOldValue,
XRValue* pNewValue
);
Parameters
- pControl
[in] Points to an IXRDependencyObject derived object that has the property whose value changed,
- pOldValue
[in] Points to an XRValue object that contains the previous value of the property.
- pNewValue
[in] Points to an XRValue object that contains the changed value of the property.
Return Value
None.
Remarks
This is a function pointer for receiving notifications of a change of the property value of a dependency property or an attached property. This function pointer is a member of the XRDependencyPropertyMetaData structure. When you specify this function pointer in XRDependencyPropertyMetaData, Silverlight calls your custom function when the value of a dependency property or of an attached property changes. The custom function that you implement must have a function signature that matches the function signature shown in the syntax section.
You can use the property change notification to perform tasks, such as enabling or disabling a UI element or displaying a specific kind of message.
Example
The following code example shows an implementation of this callback function.
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.
#include "XamlRuntime.h"
static bool namePropertyChangeHandlerCalled;
static void NamePropertyChanged(__in IXRDependencyObject* pControl, __in XRValue* pOldValue, __in XRValue* pNewValue)
{
if (pControl && pOldValue && pNewValue)
{
namePropertyChangeHandlerCalled = true;
}
}
.NET Framework Equivalent
System.Windows.PropertyChangedCallback
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |