Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
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
- Iid
[in]Optional. The REFIID of the custom user control. If you specify this parameter, application developers can use the IXRApplication::CreateObject(IID,Object) method to create the control.
- 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
clrnamespacefor 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>