適用於 Windows 市集應用程式和 Windows 執行階段的 .NET Framework 支援.NET Framework Support for Windows Store Apps and Windows Runtime

.NET Framework 4.5 支援多個具有 Windows 執行階段的軟體發展案例。The .NET Framework 4.5 supports a number of software development scenarios with the Windows Runtime. 這些案例可分成三個類別︰These scenarios fall into three categories:

本主題概述 .NET Framework 提供給這三個類別的支援,並說明 Windows 執行階段元件的案例。This topic outlines the support that the .NET Framework provides for all three categories, and describes the scenarios for Windows Runtime Components. 第一節包含有關 .NET Framework 與 Windows 執行階段之間關聯性的基本資訊,並說明您可能會在協助系統和 IDE 中遇到的一些奇觀。The first section includes basic information about the relationship between the .NET Framework and the Windows Runtime, and explains some oddities you might encounter in the Help system and the IDE. 第二個章節討論開發 Windows 執行階段元件的案例。The second section discusses scenarios for developing Windows Runtime Components.

基本概念The Basics

.NET Framework 藉由提供適用于 Windows 8.x 存放區應用程式的 .NET,以及支援 Windows 執行階段本身,來支援先前所列的三種開發案例。The .NET Framework supports the three development scenarios listed earlier by providing .NET for Windows 8.x Store apps, and by supporting the Windows Runtime itself.

  • .NET Framework 和 Windows 執行階段命名空間提供 .NET Framework 類別庫的精簡觀點,而且只包含您可以用來建立 Windows 8.X 存放區應用程式和 Windows 執行階段元件的類型和成員。.NET Framework and Windows Runtime namespaces provides a streamlined view of the .NET Framework class libraries and include only the types and members you can use to create Windows 8.x Store apps and Windows Runtime Components.

    • 當您使用 Visual Studio (Visual Studio 2012 或更新版本)來開發 Windows 8.x 存放區應用程式或 Windows 執行階段元件時,一組參考元件可確保您只會看到相關的類型和成員。When you use Visual Studio (Visual Studio 2012 or later) to develop a Windows 8.x Store app or a Windows Runtime component, a set of reference assemblies ensures that you see only the relevant types and members.

    • 藉由移除在 .NET Framework 內重複的功能,或重複的 Windows 執行階段功能,可進一步簡化此簡化的 API 集。This streamlined API set is simplified further by the removal of features that are duplicated within the .NET Framework or that duplicate Windows Runtime features. 例如,它只包含集合類型的泛型版本,而 XML 檔物件模型則會排除 Windows 執行階段 XML API 集。For example, it contains only the generic versions of collection types, and the XML document object model is eliminated in favor of the Windows Runtime XML API set.

    • 簡單地包裝作業系統 API 的功能也會移除,因為 Windows 執行階段很容易就能從 managed 程式碼呼叫。Features that simply wrap the operating system API are also removed, because the Windows Runtime is easy to call from managed code.

    若要深入瞭解適用于 Windows 8.x Store 應用程式的 .NET,請參閱適用于 Windows store 應用程式的 .net 總覽To read more about the .NET for Windows 8.x Store apps, see the .NET for Windows Store apps overview. 若要閱讀 API 選取程式的相關資訊,請參閱 .NET blog 中的適用于 Metro 樣式應用程式的 .net專案。To read about the API selection process, see the .NET for Metro style apps entry in the .NET blog.

  • Windows 執行階段提供用來建立 Windows 8.X 存放區應用程式的使用者介面元素,並提供作業系統功能的存取權。The Windows Runtime provides the user interface elements for building Windows 8.x Store apps, and provides access to operating system features. 如同 .NET Framework,Windows 執行階段的中繼資料可讓 c # 和 Visual Basic 編譯器使用 .NET Framework 類別庫的 Windows 執行階段方式。Like the .NET Framework, the Windows Runtime has metadata that enables the C# and Visual Basic compilers to use the Windows Runtime the way they use the .NET Framework class libraries. .NET Framework 藉由隱藏一些差異,讓您更輕鬆地使用 Windows 執行階段:The .NET Framework makes it easier to use the Windows Runtime by hiding some differences:

    • .NET Framework 和 Windows 執行階段之間的程式設計模式有一些差異,例如新增和移除事件處理常式的模式,則會隱藏起來。Some differences in programming patterns between the .NET Framework and the Windows Runtime, such as the pattern for adding and removing event handlers, are hidden. 您僅需使用 .NET Framework 模式。You simply use the .NET Framework pattern.

    • 常用類型 (例如基本類型和集合) 中的差異,即會予以隱藏。Some differences in commonly used types (for example, primitive types and collections) are hidden. 您只需使用 .NET Framework 類型,如本文稍後的 IDE 中可見的差異中所述。You simply use the .NET Framework type, as discussed in Differences That Are Visible in the IDE, later in this article.

大部分的情況下,.NET Framework Windows 執行階段的支援都是透明的。Most of the time, .NET Framework support for the Windows Runtime is transparent. 下一節將討論 managed 程式碼與 Windows 執行階段之間的一些明顯差異。The next section discusses some of the apparent differences between managed code and the Windows Runtime.

.NET Framework 和 Windows 執行階段參考檔The .NET Framework and the Windows Runtime Reference Documentation

Windows 執行階段和 .NET Framework 檔集是分開的。The Windows Runtime and the .NET Framework documentation sets are separate. 如果您按下 F1 鍵顯示類型或成員的 [說明],則會顯示適當集合的參考文件。If you press F1 to display Help on a type or member, reference documentation from the appropriate set is displayed. 不過,如果您流覽Windows 執行階段參考,您可能會遇到看起來令人困惑的範例:However, if you browse through the Windows Runtime reference you might encounter examples that seem puzzling:

  • 介面等主題 IIterable<T> 沒有 Visual Basic 或 c # 的宣告語法。Topics such as the IIterable<T> interface don't have declaration syntax for Visual Basic or C#. 相反地,附注會出現在語法區段的上方(在此案例中為「.NET:此介面會顯示為 System.object」 <T> )。Instead, a note appears above the syntax section (in this case, ".NET: This interface appears as System.Collections.Generic.IEnumerable<T>"). 這是因為 .NET Framework 和 Windows 執行階段會提供具有不同介面的類似功能。This is because the .NET Framework and the Windows Runtime provide similar functionality with different interfaces. 此外,還有行為的差異︰IIterable 採用 First 方法,而不是 GetEnumerator 方法傳回列舉值。In addition, there are behavioral differences: IIterable has a First method instead of a GetEnumerator method to return the enumerator. .NET Framework 不會強迫您學習不同的方式來執行一般工作,而是讓您的 managed 程式碼看起來使用您熟悉的型別,藉此支援 Windows 執行階段。Instead of forcing you to learn a different way of performing a common task, the .NET Framework supports the Windows Runtime by making your managed code appear to use the type you're familiar with. 您不會 IIterable 在 IDE 中看到介面,因此您在 Windows 執行階段參考檔中遇到的唯一方法,就是直接流覽該檔。You won't see the IIterable interface in the IDE, and therefore the only way you'll encounter it in the Windows Runtime reference documentation is by browsing through that documentation directly.

  • SyndicationFeed(String, String, Uri) 檔說明密切相關的問題:不同語言的參數類型外觀不同。The SyndicationFeed(String, String, Uri) documentation illustrates a closely related issue: Its parameter types appear to be different for different languages. 若為 C# 和 Visual Basic,參數類型為 System.StringSystem.UriFor C# and Visual Basic, the parameter types are System.String and System.Uri. 同樣地,這是因為 .NET Framework 有自己的 StringUri 類型,而針對這類常用類型,強制 .NET Framework 使用者了解其他執行工作的方式並不合理。Again, this is because the .NET Framework has its own String and Uri types, and for such commonly used types it doesn't make sense to force .NET Framework users to learn a different way of doing things. 在 IDE 中,.NET Framework 會隱藏對應的 Windows 執行階段類型。In the IDE, the .NET Framework hides the corresponding Windows Runtime types.

  • 在少數情況下(例如 GridLength 結構),.NET Framework 會提供具有相同名稱但具有更多功能的類型。In a few cases, such as the GridLength structure, the .NET Framework provides a type with the same name but more functionality. 例如,建構函式和屬性的主題集與 GridLength相關聯,但它們只有適用於 Visual Basic 和 C# 的語法區塊,這是因為成員僅適用於 Managed 程式碼。For example, a set of constructor and property topics are associated with GridLength, but they have syntax blocks only for Visual Basic and C# because the members are available only in managed code. 在 Windows 執行階段中,結構只有欄位。In the Windows Runtime, structures have only fields. Windows 執行階段結構需要 helper 類別, GridLengthHelper 才能提供對等的功能。The Windows Runtime structure requires a helper class, GridLengthHelper, to provide equivalent functionality. 您不會在撰寫 Managed 程式碼時,於 IDE 中看到該協助程式類別。You won't see that helper class in the IDE when you're writing managed code.

  • 在 IDE 中,Windows 執行階段類型會顯示為衍生自 System.ObjectIn the IDE, Windows Runtime types appear to derive from System.Object. 它們似乎具有繼承自 Object,例如 Object.ToStringThey appear to have members inherited from Object, such as Object.ToString. 這些成員的運作方式會如同實際繼承自的類型 Object ,以及可以將 Windows 執行階段類型轉換成一樣 ObjectThese members operate as they would if the types actually inherited from Object, and Windows Runtime types can be cast to Object. 這項功能屬於 .NET Framework 為 Windows 執行階段提供的支援。This functionality is part of the support that the .NET Framework provides for the Windows Runtime. 不過,如果您在 Windows 執行階段參考檔中查看類型,則不會顯示這類成員。However, if you view the types in the Windows Runtime reference documentation, no such members appear. 這些明顯繼承成員的文件由 System.Object 參考文件提供。The documentation for these apparent inherited members is provided by the System.Object reference documentation.

IDE 中可見的差異Differences That Are Visible in the IDE

在更先進的程式設計案例中,例如使用以 c # 撰寫的 Windows 執行階段元件,為使用 JavaScript 為 Windows 建立的 Windows 8.x 存放應用程式提供應用程式邏輯,這類差異在 IDE 和檔中都很明顯。In more advanced programming scenarios, such as using a Windows Runtime component written in C# to provide the application logic for a Windows 8.x Store app built for Windows using JavaScript, such differences are apparent in the IDE as well as in the documentation. 當您的元件傳回 IDictionary<int, string> javascript,且您在 javascript 偵錯工具中查看時,您會看到的方法, IMap<int, string> 因為 javascript 會使用 Windows 執行階段類型。When your component returns an IDictionary<int, string> to JavaScript, and you look at it in the JavaScript debugger, you'll see the methods of IMap<int, string> because JavaScript uses the Windows Runtime type. 下表顯示一些常用的集合類型,其會在兩種語言中以不同的方式出現︰Some commonly used collection types that appear differently in the two languages are shown in the following table:

Windows 執行階段類型Windows Runtime type 對應的 .NET Framework 類型Corresponding .NET Framework type
IIterable<T> IEnumerable<T>
IIterator<T> IEnumerator<T>
IVector<T> IList<T>
IVectorView<T> IReadOnlyList<T>
IMap<K, V> IDictionary<TKey, TValue>
IMapView<K, V> IReadOnlyDictionary<TKey, TValue>
IBindableIterable IEnumerable
IBindableVector IList
Windows.UI.Xaml.Data.INotifyPropertyChanged System.ComponentModel.INotifyPropertyChanged
Windows.UI.Xaml.Data.PropertyChangedEventHandler System.ComponentModel.PropertyChangedEventHandler
Windows.UI.Xaml.Data.PropertyChangedEventArgs System.ComponentModel.PropertyChangedEventArgs

在 Windows 執行階段中, IMap<K, V>IMapView<K, V> 會使用進行反覆運算 IKeyValuePairIn the Windows Runtime, IMap<K, V> and IMapView<K, V> are iterated using IKeyValuePair. 當您將其傳遞至 Managed 程式碼時,它們會顯示成 IDictionary<TKey, TValue>IReadOnlyDictionary<TKey, TValue>,以便您使用 System.Collections.Generic.KeyValuePair<TKey, TValue> 加以列舉。When you pass them to managed code, they appear as IDictionary<TKey, TValue> and IReadOnlyDictionary<TKey, TValue>, so naturally you use System.Collections.Generic.KeyValuePair<TKey, TValue> to enumerate them.

介面在 Managed 程式碼中的顯示方式,會影響到實作這些介面之型别的顯示方式。The way interfaces appear in managed code affects the way types that implement these interfaces appear. 例如 PropertySet 類別會實作 IMap<K, V>,而這在 Managed 程式碼中會顯示為 IDictionary<TKey, TValue>For example, the PropertySet class implements IMap<K, V>, which appears in managed code as IDictionary<TKey, TValue>. PropertySet 會以實作了 IDictionary<TKey, TValue> (而不是 IMap<K, V>) 的形態出現,因此在 Managed 程式碼中,其看似具有 Add 方法 (此方法的行為類似於 .NET Framework 字典上的 Add 方法。PropertySet appears as if it implemented IDictionary<TKey, TValue> instead of IMap<K, V>, so in managed code it appears to have an Add method, which behaves like the Add method on .NET Framework dictionaries. 它看起來並沒有 Insert 方法。It doesn't appear to have an Insert method.

如需使用 .NET Framework 建立 Windows 執行階段元件的詳細資訊,以及示範如何搭配使用這類元件與 JavaScript 的逐步解說,請參閱在 c # 中建立 Windows 執行階段元件和 Visual BasicFor more information about using the .NET Framework to create a Windows Runtime component, and a walkthrough that shows how to use such a component with JavaScript, see Creating Windows Runtime Components in C# and Visual Basic.

基本類型Primitive Types

若要在 managed 程式碼中啟用 Windows 執行階段的自然用法,.NET Framework 基本型別會出現,而不是在程式碼中 Windows 執行階段基本型別的類型。To enable the natural use of the Windows Runtime in managed code, .NET Framework primitive types appear instead of Windows Runtime primitive types in your code. 在 .NET Framework 中,基本型别 (如 Int32 結構) 具有許多有用的屬性和方法,例如 Int32.TryParse 方法。In the .NET Framework, primitive types like the Int32 structure have many useful properties and methods, such as the Int32.TryParse method. 相較之下,Windows 執行階段中的基本型別和結構只有欄位。By contrast, primitive types and structures in the Windows Runtime have only fields. 在 Managed 程式碼中使用基本項目時,將會顯示成 .NET Framework 類型,而您可以如常使用這些 .NET Framework 類型的屬性和方法。When you use primitives in managed code, they appear to be .NET Framework types, and you can use the properties and methods of the .NET Framework types as you normally would. 下列清單提供摘要︰The following list provides a summary:

  • 針對 Windows 執行階段基本 Int32 、、 Int64 SingleDoubleBooleanString (Unicode 字元的不可變集合)、、、 Enum UInt32 UInt64 和,請 Guid 在命名空間中使用相同名稱的類型 SystemFor the Windows Runtime primitives Int32, Int64, Single, Double, Boolean, String (an immutable collection of Unicode characters), Enum, UInt32, UInt64, and Guid, use the type of the same name in the System namespace.

  • 如需 UInt8,請使用 System.ByteFor UInt8, use System.Byte.

  • 如需 Char16,請使用 System.CharFor Char16, use System.Char.

  • 對於 IInspectable 介面,請使用 System.ObjectFor the IInspectable interface, use System.Object.

  • 若為 HRESULT,搭配使用結構與一個 System.Int32 成員。For HRESULT, use a structure with one System.Int32 member.

如同介面類別型,只有當您的 .NET Framework 專案是使用 JavaScript 建立的 Windows 8.x 存放區應用程式所使用的 Windows 執行階段元件時,您才會看到此標記法的辨識項。As with interface types, the only time you might see evidence of this representation is when your .NET Framework project is a Windows Runtime component that is used by a Windows 8.x Store app built using JavaScript.

其他會在 managed 程式碼中顯示為其 .NET Framework 對應專案的基本常用 Windows 執行階段類型,包括 Windows.Foundation.DateTime 結構(出現在 managed 程式碼中作為 System.DateTimeOffset 結構),以及 Windows.Foundation.TimeSpan 結構(顯示為 System.TimeSpan 結構)。Other basic, commonly used Windows Runtime types that appear in managed code as their .NET Framework equivalents include the Windows.Foundation.DateTime structure, which appears in managed code as the System.DateTimeOffset structure, and the Windows.Foundation.TimeSpan structure, which appears as the System.TimeSpan structure.

其他差異Other Differences

在少數情況下,.NET Framework 類型會出現在您的程式碼中,而不是 Windows 執行階段類型需要您採取動作。In a few cases, the fact that .NET Framework types appear in your code instead of Windows Runtime types requires action on your part. 例如, Windows.Foundation.Uri 類別 System.Uri 在 .NET Framework 程式碼中會顯示為。For example, the Windows.Foundation.Uri class appears as System.Uri in .NET Framework code. System.Uri允許相對 URI,但 Windows.Foundation.Uri 需要絕對 uri。System.Uri allows a relative URI, but Windows.Foundation.Uri requires an absolute URI. 因此,當您將 URI 傳遞至 Windows 執行階段方法時,您必須確定它是絕對的。Therefore, when you pass a URI to a Windows Runtime method, you must ensure that it's absolute. 請參閱將 URI 傳送到 Windows 執行階段See Passing a URI to the Windows Runtime.

開發 Windows 執行階段元件的案例Scenarios for Developing Windows Runtime Components

受管理 Windows 執行階段元件支援的案例取決於下列一般原則:The scenarios that are supported for managed Windows Runtime Components depend on the following general principles:

  • 使用 .NET Framework 建立 Windows 執行階段元件,與其他 Windows Runtimelibraries 沒有明顯的差異。Windows Runtime Components that are built using the .NET Framework have no apparent differences from other Windows Runtimelibraries. 例如,如果您使用 managed 程式碼重新執行原生 Windows 執行階段元件,則這兩個元件外表無法區分。For example, if you re-implement a native Windows Runtime component by using managed code, the two components are outwardly indistinguishable. 使用您元件的程式碼不會察覺到該元件是以 Managed 程式碼撰寫,即使該程式碼本身為 Managed 程式碼亦然。The fact that your component is written in managed code is invisible to the code that uses it, even if that code is itself managed code. 但在內部中,您的元件是實際的 Managed 程式碼且會在通用語言執行平台 (CLR) 上執行。However, internally, your component is true managed code and runs on the common language runtime (CLR).

  • 元件可以包含用來執行應用程式邏輯、Windows 8.x 儲存 UI 控制項或兩者的類型。Components can contain types that implement application logic, Windows 8.x Store UI controls, or both.


    將 UI 項目與應用程式邏輯分開是很好的做法。It's good practice to separate UI elements from application logic. 此外,您不能在使用 JavaScript 和 HTML 為 Windows 建立的 Windows 8.x 存放區應用程式中使用 Windows 8.x 存放區 UI 控制項。Also, you can't use Windows 8.x Store UI controls in a Windows 8.x Store app built for Windows using JavaScript and HTML.

  • 元件可以是 Windows 8.x 存放區應用程式的 Visual Studio 方案內的專案,或是可新增至多個解決方案的可重複使用元件。A component can be a project within a Visual Studio solution for a Windows 8.x Store app, or a reusable component that you can add to multiple solutions.


    如果您的元件只會搭配 c # 或 Visual Basic 使用,則不需要讓它成為 Windows 執行階段元件。If your component will be used only with C# or Visual Basic, there's no reason to make it a Windows Runtime component. 如果您將它設為一般 .NET Framework Class Library,就不需要將其公用 API 介面限制為 Windows 執行階段類型。If you make it an ordinary .NET Framework class library instead, you don't have to restrict its public API surface to Windows Runtime types.

  • 您可以使用 Windows 執行階段 VersionAttribute 屬性來識別哪些類型(以及類型中的哪些成員)已在不同版本中新增,以發行可重複使用元件的版本。You can release versions of reusable components by using the Windows Runtime VersionAttribute attribute to identify which types (and which members within a type) were added in different versions.

  • 元件中的類型可以衍生自 Windows 執行階段類型。The types in your component can derive from Windows Runtime types. 控制項可以衍生自命名空間中的基本控制項類型, Windows.UI.Xaml.Controls.Primitives 或從更多完成的控制項(例如) ButtonControls can derive from the primitive control types in the Windows.UI.Xaml.Controls.Primitives namespace or from more finished controls such as Button.


    從 Windows 8 和 .NET Framework 4.5 開始,managed Windows 執行階段元件中的所有公用類型都必須密封。Starting with Windows 8 and the .NET Framework 4.5, all public types in a managed Windows Runtime component must be sealed. 另一個 Windows 執行階段元件中的類型無法衍生自它們。A type in another Windows Runtime component can't derive from them. 如果您想要在元件中提供多型行為,您可以建立介面並在多型類型中加以實作。If you want to provide polymorphic behavior in your component, you can create an interface and implement it in the polymorphic types.

  • 元件中公用類型上的所有參數和傳回類型,都必須是 Windows 執行階段類型(包括元件所定義的 Windows 執行階段類型)。All parameter and return types on the public types in your component must be Windows Runtime types (including the Windows Runtime types that your component defines).

下列各節提供常見案例的範例。The following sections provide examples of common scenarios.

使用 JavaScript 的 Windows 8.x 儲存應用程式的應用程式邏輯Application Logic for a Windows 8.x Store App with JavaScript

當您使用 JavaScript 開發適用于 Windows 的 Windows 8.x 存放應用程式時,您可能會發現應用程式邏輯的某些部分在 managed 程式碼中的執行效能較佳,或更容易開發。When you develop a Windows 8.x Store app for Windows using JavaScript, you might find that some parts of the application logic perform better in managed code, or are easier to develop. JavaScript 不能直接使用 .NET Framework 類別庫,但是您可以將類別庫作為 .WinMD 檔案。JavaScript can't use .NET Framework class libraries directly, but you can make the class library a .WinMD file. 在此案例中,Windows 執行階段元件是應用程式不可或缺的一部分,所以提供版本屬性並沒有意義。In this scenario, the Windows Runtime component is an integral part of the app, so it doesn't make sense to provide version attributes.

可重複使用的 Windows 8.x 存放區 UI 控制項Reusable Windows 8.x Store UI Controls

您可以在可重複使用的 Windows 執行階段元件中封裝一組相關的 UI 控制項。You can package a set of related UI controls in a reusable Windows Runtime component. 元件可以自我行銷,或作為您建立之應用程式中的項目。The component can be marketed on its own or used as an element in the apps you create. 在此案例中,使用 Windows 執行階段 VersionAttribute 屬性來改善相容性是合理的。In this scenario, it makes sense to use the Windows Runtime VersionAttribute attribute to improve compatibility.

來自現有 .NET Framework 應用程式的可重複使用應用程式邏輯Reusable Application Logic from Existing .NET Framework Apps

您可以將現有桌面應用程式中的受控碼封裝為獨立 Windows 執行階段元件。You can package managed code from your existing desktop apps as a standalone Windows Runtime component. 這可讓您在 Windows 8.x 儲存應用程式中使用 c + + 或 JavaScript 建立的元件,以及使用 c # 或 Visual Basic 建立的 Windows 8.x 存放應用程式。This enables you to use the component in Windows 8.x Store apps built using C++ or JavaScript, as well as in Windows 8.x Store apps built using C# or Visual Basic. 如果程式碼有多個重複使用的案例,也可選擇進行版本控制。Versioning is an option if there are multiple reuse scenarios for the code.

TitleTitle 描述Description
適用於 Windows 市集應用程式的 .NET 概觀.NET for Windows Store apps overview 說明您可以用來建立 Windows 8.x Store 應用程式和 Windows RuntimeComponents 的 .NET Framework 類型和成員。Describes the .NET Framework types and members that you can use to create Windows 8.x Store apps and Windows RuntimeComponents. (在 Windows 開發人員中心中。)(In the Windows Dev Center.)
使用 C++ 或 Visual Basic 建立 Windows 市集應用程式的藍圖Roadmap for Windows Store apps using C# or Visual Basic 提供重要資源,協助您開始使用 c # 或 Visual Basic 開發 Windows 8.x 儲存應用程式,包括許多快速入門主題、指導方針和最佳作法。Provides key resources to help you get started developing Windows 8.x Store apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (在 Windows 開發人員中心中。)(In the Windows Dev Center.)
How to (XAML)How tos (XAML) 提供重要資源,協助您開始使用 c # 或 Visual Basic 開發 Windows 8.x 儲存應用程式,包括許多快速入門主題、指導方針和最佳作法。Provides key resources to help you get started developing Windows 8.x Store apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (在 Windows 開發人員中心中。)(In the Windows Dev Center.)
在 C++ 和 Visual Basic 中建立 Windows 執行階段元件Creating Windows Runtime Components in C# and Visual Basic 說明如何使用 .NET Framework 建立 Windows 執行階段元件、說明如何將它當做使用 JavaScript 為 Windows 建立之 Windows 8.x 存放區應用程式的一部分,並說明如何以 Visual Studio 來進行程式設計的組合。Describes how to create a Windows Runtime component using the .NET Framework, explains how to use it as part of a Windows 8.x Store app built for Windows using JavaScript, and describes how to debug the combination with Visual Studio. (在 Windows 開發人員中心中。)(In the Windows Dev Center.)
Windows 執行階段參考Windows Runtime reference Windows 執行階段的參考檔。The reference documentation for the Windows Runtime. (在 Windows 開發人員中心中。)(In the Windows Dev Center.)
將 URI 傳遞給 Windows 執行階段Passing a URI to the Windows Runtime 描述當您將 URI 從 managed 程式碼傳遞至 Windows 執行階段時可能發生的問題,以及如何避免此錯誤。Describes an issue that can arise when you pass a URI from managed code to the Windows Runtime, and how to avoid it.