Windows UI 程式庫 2.xWindows UI Library 2.x

WinUI 控制項

Windows UI 程式庫可為 Windows 應用程式提供官方原生 Windows UI 控制項和其他使用者介面元素。The Windows UI Library provides official native Windows UI controls and other user interface elements for Windows apps.

其保持舊版 Windows 10 的向下相容性,因此即便使用者沒有最新的作業系統,您的應用程式仍可運作。It maintains down-level compatibility with earlier versions of Windows 10, so your app works even if users don't have the latest OS.

注意

請查看 Windows UI 程式庫 3 預覽版 3 (2020 年 11 月),這是 Windows 10 UI 平台的重大更新。Check out the Windows UI Library 3 Preview 3 (November 2020), a major update to the Windows 10 UI platform.

功能Features

  • 新控制項:Windows UI 程式庫包含未隨附於預設 Windows 平台的新控制項。New controls: The Windows UI Library contains new controls that aren't shipped as part of the default Windows platform.

  • 現有控制項的更新版本:此程式庫也包含現有 Windows 平台控制項的更新版本,可搭配舊版 Windows 10 使用。Updated versions of existing controls: The library also contains updated versions of existing Windows platform controls that you can use with earlier versions of Windows 10.

  • 舊版 Windows 10 的支援:Windows UI 程式庫 API 可在較舊版本的 Windows 10 上運作,因此您並不需要加入版本檢查或條件式 XAML 來支援沒有執行最新作業系統的使用者。Support for earlier versions of Windows 10: Windows UI Library APIs work on earlier versions of Windows 10, so you don't have to include version checks or conditional XAML to support users who might not be running the very latest OS.

  • XamlDirect 支援:Xaml Direct API 是針對中介軟體開發人員所設計,可讓您存取較低層級的 Xaml 功能,以提供更佳的 CPU 和工作集效能。Support for XamlDirect: The Xaml Direct APIs, designed for middleware developers, gives you access to a lower-level Xaml features which provide better CPU and working set performance. XamlDirect 可讓您在舊版 Windows 10 上使用 XamlDirect API,而不需要撰寫特殊程式碼來處理多個目標 Windows 10 版本。XamlDirect 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.

範例Examples

Xaml 控制項庫範例應用程式包含 WinUI 控制項用法的互動式示範和範例程式碼。The Xaml Controls Gallery sample app includes interactive demos and sample code for using WinUI controls.

文件Documentation

Windows UI 程式庫控制項的操作說明文章隨附於通用 Windows 平台控制項文件How-to articles for Windows UI Library controls are included with the Universal Windows Platform controls documentation.

API 參照文件位於此處:Windows UI 程式庫 APIAPI reference docs are located here: Windows UI Library APIs.

安裝及使用 Windows UI 程式庫Install and use the Windows UI Library

如需指示,請參閱開始使用 Windows UI 程式庫For instructions, see Getting started with the Windows UI Library.

開放原始碼與開發人員藍圖Open source and developer roadmap

WinUI 是裝載於 GitHub 上的開放原始碼專案。WinUI is an open source project hosted on GitHub. 我們歡迎您在 Windows UI 程式庫存放庫中提出錯誤回報、功能要求和社群程式碼。We welcome bug reports, feature requests and community code contributions in the Windows UI Library repo.

我們會繼續開發及發展 WinUI,以支援更多開發人員案例。We are continuing to develop and evolve WinUI to support more developer scenarios. 如需 WinUI 計畫的最新詳細資料,請參閱 Windows UI 程式庫存放庫中的藍圖For the latest details about our plans for WinUI, see our roadmap on the Windows UI Library repo.

NuGet 套件清單NuGet package list

Windows UI 程式庫包含多個 NuGet 套件:Windows UI 程式庫 NuGet 套件清單The Windows UI Library contains multiple NuGet packages: Windows UI Library NuGet package list.

另請參閱See also

Windows UI 程式庫 2.x 版本資訊Windows UI Library 2.x Release Notes