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 的底层兼容性。因此,即使用户没有最新 OS,你的应用也可以工作。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 来支持那些可能未运行最新 OS 的用户。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 的支持:XamlDirect 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

有关说明,请参阅 Getting started with 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 库存储库中提供 Bug 报告、提交功能请求和贡献社区代码。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