Share via


IXRApplication::RegisterDependencyProperty (Windows Embedded CE 6.0)

1/6/2010

This method registers a dependency property for a user-defined control.

Syntax

virtual HRESULT STDMETHODCALLTYPE RegisterDependencyProperty(
    const WCHAR*                  pPropertyName,
    VALUE_TYPE                    vType,
    UINT                          controlId,
    XRDependencyPropertyMetaData* pMetaData,
    DEPENDENCY_PROPERTY_ID*       pDependencyPropertyIdentifier
) = 0;

Parameters

  • pPropertyName
    [in] String that contains the unique name of the dependency property.
  • vType
    [in] VALUE_TYPE enumerated type that indicates the type of property value, such as a string, integer, or object.
  • pDependencyPropertyIdentifier
    [out] DEPENDENCY_PROPERTY_ID that indicates the identifier of the dependency property.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

You can call RegisterDependencyProperty to register a new property for your custom control that will act as a dependency property in the Silverlight for Windows Embedded system. A dependency property is a property that depends on several other sources for its final, calculated value. Several factors can influence the value of a dependency property value, such as the properties of related UI objects in the presentation layout.

You can implement a dependency property when you implement a read/write property on a custom control that derives from XRCustomUserControlImpl<Base,IFace>. To specify metadata for your dependency property, such as a default value, create an XRDependencyPropertyMetaData structure and populate it with the necessary information. Then, pass this structure into the pMetaData parameter of RegisterDependencyProperty.

.NET Framework Equivalent

System.Windows.DependencyProperty.Register

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRApplication
IXRApplication::RegisterAttachedProperty
IXRCustomUserControlBase::GetPropertyValue
IXRCustomUserControlBase::SetPropertyValue