Compartir a través de


Asignaciones de tipos de Windows Runtime en .NET Framework

En la tabla siguiente se muestran las asignaciones que .NET Framework crea entre los tipos de Windows en tiempo de ejecución y los tipos de.NET Framework. En una aplicación de la Tienda Windows escrita con código administrado, IntelliSense muestra el tipo de .NET Framework en lugar del tipo de Windows en tiempo de ejecución. Por ejemplo, si un método de Windows en tiempo de ejecución toma un parámetro de tipo IVector<string>, IntelliSense muestra un parámetro de tipo IList<string>. De igual forma, en un componente de Windows en tiempo de ejecución escrito con código administrado, debes utilizar el tipo de .NET Framework en las firmas de miembro. Cuando la Herramienta de exportación de metadatos de Windows en tiempo de ejecución (Winmdexp.exe) genera tu componente de Windows en tiempo de ejecución, el tipo de .NET Framework se convierte en el tipo de Windows en tiempo de ejecución correspondiente.

La mayoría de los tipos que tienen el mismo nombre de espacio de nombres y el mismo nombre de tipo tanto en Windows en tiempo de ejecución como en .NET Framework son estructuras (o tipos asociados a estructuras, como enumeraciones). En Windows en tiempo de ejecución, las estructuras no tienen miembros que no sean campos y requieren tipos auxiliares que .NET Framework oculta. Las versiones de .NET Framework de estas estructuras tienen propiedades y métodos que proporcionan la funcionalidad de los tipos auxiliares ocultos.

Para obtener más información sobre la manera en que .NET Framework usa los metadatos de Windows para simplificar la programación con Windows en tiempo de ejecución, descarga las notas del producto CLR y Windows en tiempo de ejecución las notas del producto del Centro de desarrollo de Windows.

Tabla 1: tipos de Windows en tiempo de ejecución que asignan a .NET Framework tipos con un nombre o un espacio de nombres diferentes.

Tipo o espacio de nombres de Windows en tiempo de ejecución

Tipo o espacio de nombres de .NET Framework

Ensamblado de .NET Framework

AttributeUsageAttribute (Windows.Foundation.Metadata)

AttributeUsageAttribute (System)

System.Runtime.dll

AttributeTargets (Windows.Foundation.Metadata)

AttributeTargets (System)

System.Runtime.dll

DateTime (Windows.Foundation)

DateTimeOffset (System)

System.Runtime.dll

EventHandler<T> (Windows.Foundation)

EventHandler<T> (System)

System.Runtime.dll

EventRegistrationToken (Windows.Foundation)

EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)

System.Runtime.InteropServices.WindowsRuntime.dll

HResult (Windows.Foundation)

Exception (System)

System.Runtime.dll

IReference<T> (Windows.Foundation)

Nullable<T> (System)

System.Runtime.dll

TimeSpan (Windows.Foundation)

TimeSpan (System)

System.Runtime.dll

Uri (Windows.Foundation)

Uri (System)

System.Runtime.dll

IClosable (Windows.Foundation)

IDisposable (System)

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 (System)

System.Runtime.dll

    

Tabla 2: tipos de Windows en tiempo de ejecución que asignan a .NET Framework tipos con los mismos nombre y espacio de nombres.

Espacio de nombres

Tipo

Ensamblado de .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

Vea también

Conceptos

Crear componentes de Windows en tiempo de ejecución en C# y Visual Basic