This documentation is archived and is not being maintained.

TypeExtension Constructor (String)

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

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

public TypeExtension(
	string typeName
)
You cannot use constructors in XAML.

Parameters

typeName
Type: System.String

String identifying a type, in the format Prefix:Typename, where Prefix refers to the XML namespace prefix in a XAML file.

ExceptionCondition
ArgumentNullException

Cannot set typeName to be 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 defered until ProvideValue is called on this extension. At this time the typeName is expected to be resolvable as a type, and that type is returned.

The default namespace mapping already maps most WPF namespaces, so the prefix can be omitted for most WPF types that are commonly used in XAML.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: