DependencyObjectType.FromSystemType(Type) Method

Definition

Returns a DependencyObjectType that represents a given system (CLR) type.

C#
public static System.Windows.DependencyObjectType FromSystemType(Type systemType);

Parameters

systemType
Type

The system (CLR) type to convert.

Returns

A DependencyObjectType that represents the system (CLR) type.

Examples

The following example calls FromSystemType , creating a DependencyObjectType based on the type of the Window class.

C#
DependencyObjectType dt =
    DependencyObjectType.FromSystemType(typeof(Window));

Remarks

Each DependencyObject maintains a DependencyObjectType property that returns a DependencyObjectType, but this requires having a particular DependencyObject instance. You can use this static utility method if you do not yet have a DependencyObject instance and require a DependencyObjectType.

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