IXRApplication::RegisterAttachedProperty (Compact 2013)
3/28/2014
This method registers an attached property for a user-defined control.
Syntax
virtual HRESULT STDMETHODCALLTYPE RegisterAttachedProperty(
__in LPCWCHAR pPropertyName,
__in VALUE_TYPE vType,
__in_opt UINT objectId,
__in XRDependencyPropertyMetaData* pMetaData,
__out_opt DEPENDENCY_PROPERTY_ID* pDependencyPropertyIdentifier
) = 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.
- objectId
[in] Integer value that represents the control ID, which is retrieved by IXRApplication::RegisterControl or XRCustomUserControlImpl::ControlID.
- pMetaData
[in] XRDependencyPropertyMetaData structure that contains metadata for the attached property.
- pDependencyPropertyIdentifier
[out, optional] A value that represents the identifier of the dependency property of a custom control. A DEPENDENCY_PROPERTY_ID value is returned when you call IXRApplication::RegisterDependencyProperty to register a dependency property after you have called IXRApplication::RegisterControl to register your custom control.
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.
.NET Framework Equivalent
System.Windows.DependencyProperty.RegisterAttached
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |