XRCustomUserControlImpl::Register(iid,const WCHAR*,const WCHAR*) (Compact 2013)

3/28/2014

This method registers a custom user control with XAML for Windows Embedded.

Syntax

static HRESULT Register(
   REFIID iid,
   const WCHAR *pControlName,
   const WCHAR *pNamespace
);

Parameters

  • pControlName
    [in] The XAML name of the control.
  • pNamespace
    [in] The namespace of the control. For example: clr-namespace:EmbeddedXamlRuntime

    You must give the namespace the prefix clr-namespace for it to be compatible with XAML for Windows Embedded.

Return Values

Returns an HRESULT that indicates success or failure.

Remarks

This method provides a standard method for registering custom controls with .

Example

The following example shows an implementation of the Register method in a Derived class.

// Implemented in the MyCustomControl class.
  static HRESULT Register()
  {
    return XRCustomUserControlImpl::Register(
      __uuidof(MyCustomControl),
      L"MyCustomControl",
      L"clr-namespace:MyCustomNamespace"
      );

    // Add code to register any dependency properties.
  }

.NET Framework Equivalent

None.

Requirements

Header

xrcustomcontrol.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XRCustomUserControlImpl::Register