Share via


IXRCustomUserControlBase::GetPropertyValue (Windows Embedded CE 6.0)

1/6/2010

This method retrieves the value of a dependency property for a custom user control.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(
    DEPENDENCY_PROPERTY_ID dependencyPropertyId,
    XRValue* pXRValue
) = 0;

Parameters

  • dependencyPropertyId
    [in] DEPENDENCY_PROPERTY_ID value that indicates the identifier of the dependency property that you want to retrieve a value for.

    This identifier is created after you register the dependency property and is returned by the method IXRApplication::RegisterDependencyProperty.

  • pXRValue
    [in, out] XRValue object that, on return, contains both the type and value of the identified dependency property.

Return Value

Returns an HRESULT that indicates success or failure.

Returns XR_E_INVALID_OBJECT if pXRValue is not a Silverlight object.

Remarks

When you implement a method on a custom control that is derived from XRCustomUserControlImpl<Base,IFace>, you can call GetPropertyValue inside the method implementation.

When you implement this method, be sure to call FreeXRValue to free memory allocated for the XRValue object after extracting the necessary information from it.

You can set the default value for a dependency property by populating the DefaultValue member of XRDependencyPropertyMetaData and passing this structure into the initial call to IXRApplication::RegisterDependencyProperty. If no default is specified in this way, then this method returns NULL for string value types, 0x0 (white) for COLORREF value types, and 0 for all other value types.

.NET Framework Equivalent

None.

Requirements

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

See Also

Reference

IXRCustomUserControlBase
IXRCustomUserControlBase::SetPropertyValue