ObjectDataProvider.ObjectType Property

Definition

Gets or sets the type of object to create an instance of.

public:
 property Type ^ ObjectType { Type ^ get(); void set(Type ^ value); };
public Type ObjectType { get; set; }
member this.ObjectType : Type with get, set
Public Property ObjectType As Type

Property Value

This property is null when the ObjectDataProvider is uninitialized or explicitly set to null. If ObjectInstance is assigned, ObjectType returns the type of the object or null if the object is null. The default value is null.

Exceptions

ObjectDataProvider is assigned both an ObjectType and an ObjectInstance; only one is allowed.

Remarks

If DeferRefresh is used, ObjectInstance and Data do not update until Refresh is called.

XAML Attribute Usage

<object ObjectType="myDataType"/>  

XAML Values

myDataType
The data type to create an instance of. Use the x:Type Markup Extension to set a type.

Applies to