Windows UI 程式庫 NuGet 套件Windows UI Library NuGet Packages

NuGet 是內建於 Visual Studio 的 .Net 應用程式標準套件管理員。NuGet is a standard package manager for .Net applications that is built into Visual Studio. 從開啟的解決方案中,選擇 [工具] 功能表、[NuGet 套件管理員]、[管理方案的 NuGet 套件...] 以開啟 UI。From your open solution choose the Tools menu, NuGet Package Manager, Manage NuGet packages for solution... to open the UI. 輸入下列其中一個套件名稱,以在線上搜尋。Enter one of the package names below to search for it online.

NuGet 套件名稱NuGet Package Name 說明Description
Microsoft.UI.XamlMicrosoft.UI.Xaml 適用於 UWP 應用程式的控制項。Controls for UWP apps. 納入來自下列命名空間的 API:Microsoft.UI.XamlMicrosoft.UI.Xaml.Automation.PeersMicrosoft.Ui.Xaml.ControlsMicrosoft.UI.Xaml.Controls.PrimitivesMicrosoft.UI.Xaml.CustomAttributesMicrosoft.UI.Xaml.MediaMicrosoft.Ui.Xaml.XamlTypeInfoIncludes APIs from these namespaces: Microsoft.UI.Xaml, Microsoft.UI.Xaml.Automation.Peers, Microsoft.Ui.Xaml.Controls, Microsoft.UI.Xaml.Controls.Primitives, Microsoft.UI.Xaml.CustomAttributes, Microsoft.UI.Xaml.Media, Microsoft.Ui.Xaml.XamlTypeInfo
Microsoft.UI.Xaml.Core.DirectMicrosoft.UI.Xaml.Core.Direct 可讓您在舊版 Windows 10 上使用 XamlDirect API,而不需要撰寫特殊程式碼來處理多個目標 Windows 10 版本。Enables you to use XamlDirect APIs on earlier versions of Windows 10 without needing to write special code to handle multiple target Windows 10 versions.

在 Visual Studio 中搜尋Search in Visual Studio

在 Visual Studio 套件管理員中搜尋時,您應該會看到類似下面的清單 (版本號碼可能不同,但名稱應該會相同)。Searching in Visual Studio package manager you should see a list similar to this one (version numbers may be different, but names should be the same).

NuGet 套件管理員

更新 Nuget 套件Update NuGet Packages

我們會定期更新 Windows UI 程式庫以納入新的控制項、服務、API,以及更重要的 Bug 修正。We regularly update the Windows UI Library with new controls, services, APIs, and more importantly, bug fixes. 若要確保您使用的是最新版本,請在 Visual Studio 中開啟專案,選擇 [工具] 功能表,選取 [NuGet 套件管理員] -> [管理方案的 NuGet 套件...],然後選取 [更新] 索引標籤。選取您要更新的套件,然後按一下 [安裝] 以更新至最新版本。To make sure you are on the latest version, open your project in Visual Studio, choose the Tools menu, select NuGet Package Manager -> Manage NuGet Packages for Solution... and select the Updates tab. Select the package you want to update and click Instal to update to the latest version.

開始使用Getting Started

如需如何在自己的專案中使用這些 NuGet 套件的詳細指示,請參閱開始使用 Windows UI 程式庫Read the getting Started with the Windows UI Library for more instructions on using these NuGet Packages in your own projects.