Share via


XRCustomUserControlImpl::Register(iid,const WCHAR*,const WCHAR*) (Windows Embedded CE 6.0)

1/6/2010

This method registers a custom user control with Silverlight 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, clrnamespace:EmbeddedXamlRuntime.

    You must give the namespace the prefix clrnamespace for it to be compatible with Silverlight.

Return Values

Returns an HRESULT that indicates success or failure.

Remarks

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

Example

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

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

    //Register any dependency properties.
  }

.NET Framework Equivalent

None.

See Also

Reference

XRCustomUserControlImpl::Register
XRCustomUserControlImpl<Base,IFace>