.Net-Zuordnungen von Windows-Runtime Typen.NET mappings of Windows Runtime types

In der folgenden Tabelle sind die Zuordnungen aufgeführt, die von .net zwischen den universelle Windows-Plattform Typen (UWP) und .NET-Typen erstellt werden.The following table lists the mappings that .NET makes between Universal Windows Platform (UWP) types and .NET types. In einer universellen Windows-APP, die mit verwaltetem Code geschrieben wurde, zeigt Visual Studio IntelliSense den .NET-Typ anstelle des UWP-Typs an.In a Universal Windows app written with managed code, Visual Studio IntelliSense shows the .NET type instead of the UWP type. Wenn eine Windows-Runtime Methode z. b. einen Parameter des Typs IVector<String>annimmt, zeigt IntelliSense einen Parameter vom Typ IList<String>an.For example, if a Windows Runtime method takes a parameter of type IVector<string>, then IntelliSense shows a parameter of type IList<string>. Analog dazu verwenden Sie in einer Windows-Runtime-Komponente, die mit verwaltetem Code geschrieben wurde, den .NET-Typ in Element Signaturen.Similarly, in a Windows Runtime component written with managed code, you use the .NET type in member signatures. Wenn das Windows-Runtime Metadata-Export Tool (winmdexp. exe) Ihre Windows-Runtime Komponente generiert, wird der .NET-Typ in den entsprechenden UWP-Typ übersetzt.When the Windows Runtime Metadata Export Tool (Winmdexp.exe) generates your Windows Runtime Component, the .NET type is translated into the corresponding UWP type.

Die meisten der Typen, die in UWP und .net denselben Namespace Namen und Typnamen aufweisen, sind Strukturen (oder Typen, die Strukturen zugeordnet sind, z. b. Enumerationen).Most of the types that have the same namespace name and type name in both the UWP and .NET are structures (or types associated with structures, such as enumerations). In UWP haben Strukturen keine anderen Member als Felder und benötigen Hilfstypen, die von .net ausgeblendet werden.In UWP, structures have no members other than fields, and require helper types, which .NET hides. Die .NET-Versionen dieser Strukturen verfügen über Eigenschaften und Methoden, die die Funktionalität der ausgeblendeten Hilfstypen bereitstellen.The .NET versions of these structures have properties and methods that provide the functionality of the hidden helper types.

UWP-Typen, die .NET-Typen mit demselben Namen und Namespace zugeordnet sindUWP types that map to .NET types with the same name and namespace

In der .NET-Assembly System. ObjectModel. dllIn .NET assembly System.ObjectModel.dll

NamespaceNamespace TypType
Windows.UI.Xaml.InputWindows.UI.Xaml.Input ICommandICommand

In der .NET-Assembly System. Runtime. windowsruntime. dllIn .NET assembly System.Runtime.WindowsRuntime.dll

NamespaceNamespace TypType
Windows.FoundationWindows.Foundation PunktPoint
Windows.FoundationWindows.Foundation RectRect
Windows.FoundationWindows.Foundation GrößeSize
Windows.UIWindows.UI FarbeColor

In der .NET-Assembly System. Runtime. windowsruntime. UI. XAML. dllIn .NET assembly System.Runtime.WindowsRuntime.UI.Xaml.dll

NamespaceNamespace TypType
Windows.UI.XamlWindows.UI.Xaml CornerRadiusCornerRadius
Windows.UI.XamlWindows.UI.Xaml DauerDuration
Windows.UI.XamlWindows.UI.Xaml DurationTypDurationType
Windows.UI.XamlWindows.UI.Xaml GridLengthGridLength
Windows.UI.XamlWindows.UI.Xaml GridUnitTypeGridUnitType
Windows.UI.XamlWindows.UI.Xaml StärkeThickness
Windows.UI.Xaml.Controls.PrimitivesWindows.UI.Xaml.Controls.Primitives GeneratorPositionGeneratorPosition
Windows.UI.Xaml.MediaWindows.UI.Xaml.Media MatrixMatrix
Windows.UI.Xaml.Media.AnimationWindows.UI.Xaml.Media.Animation KeyTimeKeyTime
Windows.UI.Xaml.Media.AnimationWindows.UI.Xaml.Media.Animation RepeatBehaviorRepeatBehavior
Windows.UI.Xaml.Media.AnimationWindows.UI.Xaml.Media.Animation RepeatBehaviorTypRepeatBehaviorType
Windows.UI.Xaml.Media.Media3DWindows.UI.Xaml.Media.Media3D Matrix3DMatrix3D

UWP-Typen, die .NET-Typen mit einem anderen Namen und/oder einem anderen Namespace zugeordnet sindUWP types that map to .NET types with a different name and/or namespace

In der .NET-Assembly System. ObjectModel. dllIn .NET assembly System.ObjectModel.dll

UWP-Typ/NamespaceUWP type/namespace .NET-Typ/-Namespace.NET type/namespace
INotifyCollectionChanged (Windows.UI.Xaml.Interop)INotifyCollectionChanged (Windows.UI.Xaml.Interop) INotifyCollectionChanged (System.Collections.Specialized)INotifyCollectionChanged (System.Collections.Specialized)
NotifyCollectionChangedEventHandler (Windows.UI.Xaml.Interop)NotifyCollectionChangedEventHandler (Windows.UI.Xaml.Interop) NotifyCollectionChangedEventHandler (System.Collections.Specialized)NotifyCollectionChangedEventHandler (System.Collections.Specialized)
NotifyCollectionChangedEventArgs (Windows.UI.Xaml.Interop)NotifyCollectionChangedEventArgs (Windows.UI.Xaml.Interop) NotifyCollectionChangedEventArgs (System.Collections.Specialized)NotifyCollectionChangedEventArgs (System.Collections.Specialized)
NotifyCollectionChangedAction (Windows.UI.Xaml.Interop)NotifyCollectionChangedAction (Windows.UI.Xaml.Interop) NotifyCollectionChangedAction (System.Collections.Specialized)NotifyCollectionChangedAction (System.Collections.Specialized)
INotifyPropertyChanged (Windows.UI.Xaml.Data)INotifyPropertyChanged (Windows.UI.Xaml.Data) INotifyPropertyChanged (System.ComponentModel)INotifyPropertyChanged (System.ComponentModel)
PropertyChangedEventHandler (Windows.UI.Xaml.Data)PropertyChangedEventHandler (Windows.UI.Xaml.Data) PropertyChangedEventHandler (System.ComponentModel)PropertyChangedEventHandler (System.ComponentModel)
PropertyChangedEventArgs (Windows.UI.Xaml.Data)PropertyChangedEventArgs (Windows.UI.Xaml.Data) PropertyChangedEventArgs (System.ComponentModel)PropertyChangedEventArgs (System.ComponentModel)

In der .NET-Assembly System. Runtime. dllIn .NET assembly System.Runtime.dll

UWP-Typ/NamespaceUWP type/namespace .NET-Typ/-Namespace.NET type/namespace
AttributeUsageAttribute (Windows.Foundation.Metadata)AttributeUsageAttribute (Windows.Foundation.Metadata) AttributeUsageAttribute (System)AttributeUsageAttribute (System)
AttributeTargets (Windows.Foundation.Metadata)AttributeTargets (Windows.Foundation.Metadata) AttributeTargets (System)AttributeTargets (System)
DateTime (Windows.Foundation)DateTime (Windows.Foundation) DateTimeOffset (System)DateTimeOffset (System)
EventHandler<T> (Windows.Foundation)EventHandler<T> (Windows.Foundation) EventHandler<T> (System)EventHandler<T> (System)
HResult (Windows.Foundation)HResult (Windows.Foundation) Exception (System)Exception (System)
IReference<T> (Windows.Foundation)IReference<T> (Windows.Foundation) Nullable<T> (System)Nullable<T> (System)
TimeSpan (Windows.Foundation)TimeSpan (Windows.Foundation) TimeSpan (System)TimeSpan (System)
Uri (Windows.Foundation)Uri (Windows.Foundation) Uri (System)Uri (System)
IClosable (Windows.Foundation)IClosable (Windows.Foundation) IDisposable (System)IDisposable (System)
IIterable<T> (Windows.Foundation.Collections)IIterable<T> (Windows.Foundation.Collections) IEnumerable<T> (System.Collections.Generic)IEnumerable<T> (System.Collections.Generic)
IVector<T> (Windows.Foundation.Collections)IVector<T> (Windows.Foundation.Collections) IList<T> (System.Collections.Generic)IList<T> (System.Collections.Generic)
IVectorView<T> (Windows.Foundation.Collections)IVectorView<T> (Windows.Foundation.Collections) IReadOnlyList<T> (System.Collections.Generic)IReadOnlyList<T> (System.Collections.Generic)
IMap<K,V> (Windows.Foundation.Collections)IMap<K,V> (Windows.Foundation.Collections) IDictionary<TKey,TValue> (System.Collections.Generic)IDictionary<TKey,TValue> (System.Collections.Generic)
IMapView<K,V> (Windows.Foundation.Collections)IMapView<K,V> (Windows.Foundation.Collections) IReadOnlyDictionary<TKey,TValue> (System.Collections.Generic)IReadOnlyDictionary<TKey,TValue> (System.Collections.Generic)
IKeyValuePair<K,V> (Windows.Foundation.Collections)IKeyValuePair<K,V> (Windows.Foundation.Collections) KeyValuePair<TKey,TValue> (System.Collections.Generic)KeyValuePair<TKey,TValue> (System.Collections.Generic)
IBindableIterable (Windows.UI.Xaml.Interop)IBindableIterable (Windows.UI.Xaml.Interop) IEnumerable (System.Collections)IEnumerable (System.Collections)
IBindableVector (Windows.UI.Xaml.Interop)IBindableVector (Windows.UI.Xaml.Interop) IList (System.Collections)IList (System.Collections)
TypeName (Windows.UI.Xaml.Interop)TypeName (Windows.UI.Xaml.Interop) Type (System)Type (System)

In der .NET-Assembly System. Runtime. InteropServices. windowsruntime. dllIn .NET assembly System.Runtime.InteropServices.WindowsRuntime.dll

UWP-Typ/NamespaceUWP type/namespace .NET-Typ/-Namespace.NET type/namespace
EventRegistrationToken (Windows.Foundation)EventRegistrationToken (Windows.Foundation) EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)