Mappages .NET Framework des types Windows Runtime

Le tableau suivant répertorie les mappages que le.NET Framework effectue entre des types Windows Runtime et des types .NET Framework. Dans une application Windows Store écrite avec du code managé, IntelliSense affiche le type .NET Framework au lieu du type Windows Runtime. Par exemple, si une méthode Windows Runtime accepte un paramètre de type IVector<string>, IntelliSense affiche un paramètre de type IList<string>. De même, dans un composant Windows Runtime écrit avec du code managé, vous devez utiliser le type .NET Framework dans les signatures de membre. Lorsque l'outil d'exportation de métadonnées Windows Runtime(Winmdexp.exe) génère le composant Windows Runtime, le type .NET Framework devient le type Windows Runtime correspondant.

La plupart des types ayant le même nom d'espace de noms et le même nom de type à la fois dans Windows Runtime et .NET Framework sont des structures (ou des types associés aux structures, telles que des énumérations). Dans Windows Runtime, les structures n'ont aucun membre autres que les champs, et requièrent des types d'assistance, masqués par .NET Framework. Les versions .NET Framework de ces structures possèdent des propriétés et des méthodes qui fournissent les fonctionnalités des types d'assistance masqués.

Pour plus d'informations sur la façon dont le .NET Framework utilise les métadonnées Windows pour simplifier la programmation avec Windows Runtime, téléchargez le livre blancCLR and the Windows Runtime/// du centre de développement Windows.

Tableau 1 : types Windows Runtime qui correspondent aux types .NET Framework avec un nom et/ou un espace de noms différents.

Type /espace de noms Windows Runtime

Type /espace de noms .NET Framework

Assembly .NET Framework

AttributeUsageAttribute (Windows.Foundation.Metadata)

AttributeUsageAttribute (Système)

System.Runtime.dll

AttributeTargets (Windows.Foundation.Metadata)

AttributeTargets (Système)

System.Runtime.dll

DateTime (Windows.Foundation)

DateTimeOffset (Système)

System.Runtime.dll

EventHandler<T> (Windows.Foundation)

EventHandler<T> (Système)

System.Runtime.dll

EventRegistrationToken (Windows.Foundation)

EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)

System.Runtime.InteropServices.WindowsRuntime.dll

HResult (Windows.Foundation)

Exception (Système)

System.Runtime.dll

IReference<T> (Windows.Foundation)

Nullable<T> (Système)

System.Runtime.dll

TimeSpan (Windows.Foundation)

TimeSpan (Système)

System.Runtime.dll

Uri (Windows.Foundation)

Uri (Système)

System.Runtime.dll

IClosable (Windows.Foundation)

IDisposable (Système)

System.Runtime.dll

IIterable<T> (Windows.Foundation.Collections)

IEnumerable<T> (System.Collections.Generic)

System.Runtime.dll

IVector<T> (Windows.Foundation.Collections)

IList<T> (System.Collections.Generic)

System.Runtime.dll

IVectorView<T> (Windows.Foundation.Collections)

IReadOnlyList<T> (System.Collections.Generic)

System.Runtime.dll

IMap<K,V> (Windows.Foundation.Collections)

IDictionary<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IMapView<K,V> (Windows.Foundation.Collections)

IReadOnlyDictionary<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IKeyValuePair<K,V> (Windows.Foundation.Collections)

KeyValuePair<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IBindableIterable (Windows.UI.Xaml.Interop)

IEnumerable (System.Collections)

System.Runtime.dll

IBindableVector (Windows.UI.Xaml.Interop)

IList (System.Collections)

System.Runtime.dll

INotifyCollectionChanged (Windows.UI.Xaml.Interop)

INotifyCollectionChanged (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedEventHandler (Windows.UI.Xaml.Interop)

NotifyCollectionChangedEventHandler (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedEventArgs (Windows.UI.Xaml.Interop)

NotifyCollectionChangedEventArgs (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedAction (Windows.UI.Xaml.Interop)

NotifyCollectionChangedAction (System.Collections.Specialized)

System.ObjectModel.dll

INotifyPropertyChanged (Windows.UI.Xaml.Data)

INotifyPropertyChanged (System.ComponentModel)

System.ObjectModel.dll

PropertyChangedEventHandler (Windows.UI.Xaml.Data)

PropertyChangedEventHandler (System.ComponentModel)

System.ObjectModel.dll

PropertyChangedEventArgs (Windows.UI.Xaml.Data)

PropertyChangedEventArgs (System.ComponentModel)

System.ObjectModel.dll

TypeName (Windows.UI.Xaml.Interop)

Type (Système)

System.Runtime.dll

    

Tableau 2 : types Windows Runtime qui correspondent aux types .NET Framework portant le même nom et le même espace de noms.

Espace de noms

Type

Assembly .NET Framework

Windows.UI

Color

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Point

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Rect

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Size

System.Runtime.WindowsRuntime.dll

Windows.UI.Xaml.Input

ICommand

System.ObjectModel.dll

Windows.UI.Xaml

CornerRadius

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

Duration

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

DurationType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

GridLength

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

GridUnitType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

Thickness

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Controls.Primitives

GeneratorPosition

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media

Matrix

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

KeyTime

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

RepeatBehavior

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

RepeatBehaviorType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Media3D

Matrix3D

System.Runtime.WindowsRuntime.UI.Xaml.dll

Voir aussi

Concepts

Création de composants Windows Runtime en C# et Visual Basic