Share via


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.

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

See Also

Reference

IXRApplication
IXRApplication::RegisterDependencyProperty