DependencyObjectType.FromSystemType Method

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

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)

public static DependencyObjectType FromSystemType (
	Type systemType
)
public static DependencyObjectType FromSystemType (
	Type systemType
)
public static function FromSystemType (
	systemType : Type
) : DependencyObjectType
You cannot use methods in XAML.

Parameters

systemType

The system (CLR) type to convert.

Return Value

A DependencyObjectType that represents the system (CLR) type.

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.

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

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: