Export (0) Print
Expand All

HtmlPage.RegisterCreateableType Method

Silverlight

Registers a managed type as available for creation from JavaScript code, through the Content.services.createObject and Content.services.createManagedObject helper methods.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

public static void RegisterCreateableType(
	string scriptAlias,
	Type type
)

Parameters

scriptAlias
Type: System.String
The name used to register the managed type.
type
Type: System.Type
A managed type.

ExceptionCondition
ArgumentNullException

scriptAlias or type is null.

ArgumentException

type is not public.

-or-

type does not have a public, parameterless constructor.

-or-

type is a string, primitive or value type, managed delegate, or empty string.

-or-

type contains an embedded null character (\0).

-or-

An attempt is made to reregister type.

Use the scriptAlias parameter to indicate the managed type you want to create .

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft