ObjectDataProvider.ObjectType Property

Definition

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

public Type ObjectType { get; set; }

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

Produkt Wersje
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10