IXRApplication::RegisterAttachedProperty (Windows Embedded CE 6.0)
1/6/2010
This method registers an attached property for a user-defined control.
Syntax
virtual HRESULT STDMETHODCALLTYPE RegisterAttachedProperty(
const WCHAR* pPropertyName,
VALUE_TYPE vType,
UINT controlId,
XRDependencyPropertyMetaData* pMetaData
) = 0;
Parameters
- pPropertyName
[in] Pointer to a string that indicates the name of the attached property to register.
- vType
[in] VALUE_TYPE enumerated value that indicates the type of property value, such as a string, integer, or object.
- controlId
[in] Integer value that represents the control ID, which is retrieved by IXRApplication::RegisterControl.
- pMetaData
[in] XRDependencyPropertyMetaData structure that contains metadata for the attached property.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
If you register an attached property, other objects can access its value by calling either IXRDependencyObject::GetAttachedProperty or IXRDependencyObject::SetAttachedProperty and referencing it by using the object.propertyname syntax.
Objects that inherit from IXRDependencyObject can support attached properties.
In addition to registering the attached property, you should also define a Set method accessor. Typically you also define a Get method accessor so that the owning type can use the values as set by other objects.
.NET Framework Equivalent
System.Windows.DependencyProperty.RegisterAttached
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |