DependencyObjectType.FromSystemType(Type) Methode
Definition
Gibt einen DependencyObjectType zurück, der einen bestimmten Systemtyp (CLRCLR) darstellt.Returns a DependencyObjectType that represents a given system (CLRCLR) type.
public:
static System::Windows::DependencyObjectType ^ FromSystemType(Type ^ systemType);
public static System.Windows.DependencyObjectType FromSystemType (Type systemType);
static member FromSystemType : Type -> System.Windows.DependencyObjectType
Public Shared Function FromSystemType (systemType As Type) As DependencyObjectType
Parameter
- systemType
- Type
Der Systemtyp (CLRCLR), der konvertiert werden soll.The system (CLRCLR) type to convert.
Gibt zurück
Ein DependencyObjectType, der den Systemtyp (CLRCLR) darstellt.A DependencyObjectType that represents the system (CLRCLR) type.
Beispiele
Im folgenden Beispiel wird FromSystemType aufgerufen, wobei DependencyObjectType basierend Window auf dem Typ der-Klasse erstellt wird.The following example calls FromSystemType , creating a DependencyObjectType based on the type of the Window class.
DependencyObjectType dt =
DependencyObjectType.FromSystemType(typeof(Window));
Dim dt As DependencyObjectType = DependencyObjectType.FromSystemType(GetType(Window))
Hinweise
Jeder DependencyObject verwaltet eine DependencyObjectType Eigenschaft, die einen DependencyObjectTypezurückgibt, aber hierfür muss eine DependencyObject bestimmte Instanz vorhanden sein.Each DependencyObject maintains a DependencyObjectType property that returns a DependencyObjectType, but this requires having a particular DependencyObject instance. Sie können diese statische Utility-Methode verwenden, wenn Sie noch nicht über DependencyObject eine-Instanz verfügen DependencyObjectTypeund einen benötigen.You can use this static utility method if you do not yet have a DependencyObject instance and require a DependencyObjectType.