Windows ランタイム型の .NET マッピング.NET mappings of Windows Runtime types

次の表は、.NET がユニバーサル Windows プラットフォーム (UWP) 型と .NET 型の間で行うマッピングを示しています。The following table lists the mappings that .NET makes between Universal Windows Platform (UWP) types and .NET types. マネージコードで記述されたユニバーサル Windows アプリでは、Visual Studio IntelliSense は UWP 型ではなく .NET 型を表示します。In a Universal Windows app written with managed code, Visual Studio IntelliSense shows the .NET type instead of the UWP type. たとえば、Windows ランタイム<メソッドが ivector 文字列>型のパラメーターを受け取る場合、IntelliSense は IList<string>型のパラメーターを表示します。For example, if a Windows Runtime method takes a parameter of type IVector<string>, then IntelliSense shows a parameter of type IList<string>. 同様に、マネージコードで記述された Windows ランタイムコンポーネントでは、メンバーシグネチャで .NET 型を使用します。Similarly, in a Windows Runtime component written with managed code, you use the .NET type in member signatures. Windows ランタイムメタデータのエクスポートツール (Winmdexp)によって Windows ランタイムコンポーネントが生成されると、.net 型は対応する UWP 型に変換されます。When the Windows Runtime Metadata Export Tool (Winmdexp.exe) generates your Windows Runtime Component, the .NET type is translated into the corresponding UWP type.

UWP と .NET の両方で同じ名前空間名と型名を持つほとんどの型は、構造体 (または、列挙型などの構造体に関連付けられた型) です。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). UWP では、構造体はフィールド以外のメンバーを持ちません。また、.NET によって隠ぺいされるヘルパー型を必要とします。In UWP, structures have no members other than fields, and require helper types, which .NET hides. これらの構造体の .NET バージョンには、非表示のヘルパー型の機能を提供するプロパティとメソッドがあります。The .NET versions of these structures have properties and methods that provide the functionality of the hidden helper types.

同じ名前と名前空間を持つ .NET 型にマップされる UWP 型UWP types that map to .NET types with the same name and namespace

.NET アセンブリシステムの場合In .NET assembly System.ObjectModel.dll

NamespaceNamespace 種類Type
Windows.UI.Xaml.InputWindows.UI.Xaml.Input ICommandICommand

.NET アセンブリの WindowsRuntime で、In .NET assembly System.Runtime.WindowsRuntime.dll

NamespaceNamespace 種類Type
Windows.FoundationWindows.Foundation ポイントPoint
Windows.FoundationWindows.Foundation RectRect
Windows.FoundationWindows.Foundation サイズSize
Windows.UIWindows.UI Color

.NET アセンブリの WindowsRuntime に含まれています。In .NET assembly System.Runtime.WindowsRuntime.UI.Xaml.dll

NamespaceNamespace 種類Type
Windows.UI.XamlWindows.UI.Xaml CornerRadiusCornerRadius
Windows.UI.XamlWindows.UI.Xaml DurationDuration
Windows.UI.XamlWindows.UI.Xaml DurationTypeDurationType
Windows.UI.XamlWindows.UI.Xaml GridLengthGridLength
Windows.UI.XamlWindows.UI.Xaml GridUnitTypeGridUnitType
Windows.UI.XamlWindows.UI.Xaml 太さThickness
Windows.UI.Xaml.Controls.PrimitivesWindows.UI.Xaml.Controls.Primitives GeneratorPositionGeneratorPosition
Windows.UI.Xaml.MediaWindows.UI.Xaml.Media マトリックスMatrix
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 RepeatBehaviorTypeRepeatBehaviorType
Windows.UI.Xaml.Media.Media3DWindows.UI.Xaml.Media.Media3D Matrix3DMatrix3D

異なる名前または名前空間を持つ .NET 型にマップされる UWP 型UWP types that map to .NET types with a different name and/or namespace

.NET アセンブリシステムの場合In .NET assembly System.ObjectModel.dll

UWP 型/名前空間UWP type/namespace .NET 型/名前空間.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)

.NET アセンブリシステムの .dllIn .NET assembly System.Runtime.dll

UWP 型/名前空間UWP type/namespace .NET 型/名前空間.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)

.NET アセンブリ InteropServices で、WindowsRuntime を実行します。In .NET assembly System.Runtime.InteropServices.WindowsRuntime.dll

UWP 型/名前空間UWP type/namespace .NET 型/名前空間.NET type/namespace
EventRegistrationToken (Windows.Foundation)EventRegistrationToken (Windows.Foundation) EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)