TypeExtension Constructor (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the TypeExtension class, initializing the TypeName value based on the provided typeName string.

Namespace:   System.Windows.Markup
Assembly:  System.Xaml (in System.Xaml.dll)

Public Sub New (
	typeName As String


Type: System.String

A string that identifies the type to make a reference to. This string uses the format prefix:classNameprefix is the mapping prefix for a XAML namespace, and is only required to reference types that are not mapped to the default XAML namespace.

Exception Condition

Attempted to specify typeName as null.

This value is not evaluated when you set it in the constructor. If the value is not null, the value will be initially accepted. The actual parsing and evaluation of the value is deferred until ProvideValue is called on this extension, when XAML is parsed and with available service contexts active. At this time the typeName is expected to be resolvable as a type within a XAML schema context, and that type is returned.

.NET Framework
Available since 3.0
Return to top