TypeExtension.Type Property

 

Gets or sets the type information for this extension.

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

public Type Type { get; set; }

Property Value

Type: System.Type

The established type. For runtime purposes, this may be null for get access, but cannot be set to null.

Exception Condition
ArgumentNullException

Attempted to set to null.

Unless this instance was deliberately instantiated with the TypeExtension(Type) signature constructor, this value will be null. This property will not be reset when ProvideValue is called. If you want the true type represented you should always call ProvideValue rather than check this property.

This property is settable per usual rules regarding markup extension usage. However, if you are setting with a Type, then the purpose of this markup extension is irrelevant, because the same Type is returned from a ProvideValue call.

.NET Framework
Available since 3.0
Return to top
Show: