Windows Presentation Foundation (WPF)

WPF是一个用于构建Windows桌面应用程序的.NET核心UI框架。「WPF is a .NET Core UI framework for building Windows desktop applications.」

Github星跟踪图

Windows Presentation Foundation (WPF)

Windows Presentation Foundation (WPF) 是一个用于构建 Windows 桌面应用程序的 UI 框架。WPF支持广泛的应用程序开发特性,包括应用程序模型、资源、控件、图形、布局、数据绑定和文档。WPF 使用可扩展应用程序标记语言(XAML)为应用程序编程提供声明性模型。

WPF 应用程序是基于矢量图形架构的。这使得应用程序在高DPI监视器上看起来非常好,因为它们可以无限伸缩。WPF 还包括一个灵活的托管模型,例如,它可以直接在一个按钮中托管视频。visual Studio 提供的可视化设计器通过拖放和直接编辑 XAML 标记,使构建WPF应用程序变得容易。

查看 WPF 路线图 以了解项目优先级、状态和发布日期。

WinForms 是另一个用于构建 Windows 桌面应用程序的UI框架,它在 .NET Core 上得到了支持。WPF 和 WinForms 应用程序只在 Windows 上运行。它们是 Microsoft.NET.Sdk.WindowsDesktop SDK 的一部分。建议您使用 Visual Studio 2019 在 .NET Core 中来使用 WPF 和 WinForms 。

开始使用

状态

  • 我们目前正在规划 .NET 5。
  • 我们已经完成了 WPF 源代码的发布。您可以在 https://github.com/dotnet/wpf/issues/2554 了解更多信息。
  • 作为.NET Core 3.0的一部分,我们已经完成了将WPF移植到.NET Core的工作,您可以在 这里 了解更多关于所做的工作。

请参阅 WPF 路线图,了解特定 WPF 组件的时间表。

我们已经发布了很少的测试,因此目前对 PR 的覆盖面有限。我们将在 2019 年和 2020 年增加更多的测试,然而,这将是一个渐进的过程。

Visual Studio WPF 设计器现在已作为 Visual Studio 2019 的一部分提供。

如何参与、贡献和提供反馈?

贡献的一些最好的方式是尝试一些东西,提交 bug,加入设计对话,并修复问题:

.NET 框架问题

与 .NET 框架(包括 WPF)有关的问题应提交到 VS 开发者社区产品支持 中。它们不应该提交到这个软件 repo。

与 .NET Framework 的关系

这个代码库是 .NET 框架中 WPF 代码的一个分叉。.NET Core 3.0 发布时,目标是让 WPF 与 .NET 框架版本具有同等性。随着时间的推移,这两种实现可能会出现分歧。

关于 .NET Core 3.0 和 .NET Framework 4.8 的更新 很好地描述了 .NET Core和.NET Framework 之间的前瞻性差异。

更新 说明了如何向前发展 .NET Core 是 .NET 的未来,而 .NET Framework 4.8 将是 .NET Framework 的最后一个主要版本。

行为准则

本项目使用 .NET 基金会行为准则 来定义我们社区中的预期行为。滥用、骚扰或其他不可接受的行为实例可以通过联系项目维护者来报告:conduct@dotnetfoundation.org。

报告安全问题和安全漏洞

安全问题和错误应通过电子邮件私下报告给 Microsoft 安全响应中心 (MSRC) secure@microsoft.com。您应该在24小时内收到回复。如果由于某些原因您没有收到,请通过电子邮件跟进,以确保我们收到您的原始信息。更多信息,包括MSRC PGP密钥,可以在 安全技术中心 找到。

此外,还可以查看相关的 Microsoft .NET Core 和 ASP.NET Core Bug Bounty 计划 的信息。

许可证

.NET Core(包括 WPF repo)采用 MIT 许可

.NET 基础

.NET Core WPF 是一个 .NET 基金会 项目。

请参阅 .NET home repo 来查找其他 .NET 相关项目。


主要指标

概览
名称与所有者dotnet/wpf
主编程语言C#
编程语言Batchfile (语言数: 18)
平台Windows
许可证MIT License
所有者活动
创建于2018-10-19 01:55:23
推送于2025-06-10 17:29:32
最后一次提交
发布数206
最新版本名称v9.0.6 (发布于 )
第一版名称v4.8.0-prerelease.18562.2 (发布于 2018-11-30 12:22:44)
用户参与
星数7.3k
关注者数291
派生数1.2k
提交数6.4k
已启用问题?
问题数2984
打开的问题数1300
拉请求数7088
打开的拉请求数188
关闭的拉请求数378
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Windows Presentation Foundation (WPF)

Build Status
MIT License

Windows Presentation Foundation (WPF) is a UI framework for building Windows desktop applications. WPF supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding and documents. WPF uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming.

WPF applications are based on a vector graphics architecture. This enables applications to look great on high DPI monitors, as they can be infinitely scaled. WPF also includes a flexible hosting model, which makes it straightforward to host a video in a button, for example. The visual designer provided in Visual Studio makes it easy to build WPF application, with drag-in-drop and/or direct editing of XAML markup.

See the WPF Roadmap to learn about project priorities, status and ship dates.

WinForms is another UI framework for building Windows desktop applications that is supported on .NET Core. WPF and WinForms applications only run on Windows. They are part of the Microsoft.NET.Sdk.WindowsDesktop SDK. You are recommended to use Visual Studio 2019 to use WPF and WinForms with .NET Core.

Getting started

Status

We are in the process of doing four projects with WPF:

  • Port WPF to .NET Core.
  • Publish source to GitHub.
  • Publish (and in some cases write) tests to GitHub and enable automated testing infrastructure.
  • Enable the Visual Studio WPF designer to work with WPF running on .NET Core.

We have completed porting WPF to .NET Core as part of .NET Core 3.0, you can learn more about what was done here.

We have published the vast majority of the WPF source. We will continue to publish WPF components through the rest of 2019.

See the WPF roadmap to learn about the schedule for specific WPF components.

We have published few tests and have limited coverage for PRs at this time as a result. We will add more tests in 2019 and 2020, however, it will be a progressive process.

The Visual Studio WPF designer is now available as part of Visual Studio 2019.

How to Engage, Contribute and Provide Feedback

Some of the best ways to contribute are to try things out, file bugs, join in design conversations, and fix issues.

.NET Framework issues

Issues with .NET Framework, including WPF, should be filed on VS developer community,
or Product Support.
They should not be filed on this repo.

Relationship to .NET Framework

This code base is a fork of the WPF code in the .NET Framework. .NET Core 3.0 was released with a goal of WPF having parity with the .NET Framework version. Over time, the two implementations may diverge.

The Update on .NET Core 3.0 and .NET Framework 4.8 provides a good description of the forward-looking differences between .NET Core and .NET Framework.

This update states how going forward .NET Core is the future of .NET. and .NET Framework 4.8 will be the last major version of .NET Framework.

Code of Conduct

This project uses the .NET Foundation Code of Conduct to define expected conduct in our community. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at conduct@dotnetfoundation.org.

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Also see info about related Microsoft .NET Core and ASP.NET Core Bug Bounty Program.

License

.NET Core (including the WPF repo) is licensed under the MIT license.

.NET Foundation

.NET Core WPF is a .NET Foundation project.

See the .NET home repo to find other .NET-related projects.