Building Modern Windows Apps with .NET Core and WPF
For years, building a Windows desktop application meant being tied to the full .NET Framework. If you wanted the latest performance improvements, side-by-side deployment, or containerization that .NET Core offered, you were out of luck for traditional WPF or Windows Forms apps. That wall has officially come down.
The open-source Windows Presentation Foundation (WPF) repo on GitHub represents a major shift. It’s the framework you know, now modernized and running on top of .NET Core (and its successors, like .NET 5+). This means you can bring your existing WPF UI code forward and finally leverage all the benefits of the modern .NET ecosystem.
What It Does
In short, this project is WPF, re-platformed. It takes the powerful, XAML-based UI framework used for building visually stunning Windows desktop applications and makes it a first-class citizen on .NET Core. It’s not a rewrite; it’s the same WPF engine and APIs, now built on the modern, cross-platform .NET runtime. This allows you to update your project files, retarget your application, and keep your core UI code largely intact.
Why It’s Cool
The "cool" factor here is all about unlocking potential without a painful rewrite.
- Leverage Modern .NET: Get the performance boosts, smaller deployment footprints (via self-contained deployments), and the faster release cadence of .NET.
- Side-by-Side Execution: Run multiple versions of your app on the same machine without conflicts, a classic .NET Core benefit.
- Containerization: You can now containerize your WPF apps, which is a huge win for testing and deployment consistency, especially in enterprise environments.
- Open Source & Transparent: The entire WPF framework is developed in the open on GitHub. You can file issues, see the roadmap, and even contribute fixes.
- Incremental Modernization: Have a massive, legacy WPF codebase? You can move it to .NET Core piece by piece, mixing in new .NET Core libraries while the UI layer transitions.
It’s the bridge that lets your desktop apps stop living in the past and start taking advantage of the last decade of .NET innovation.
How to Try It
The best way to start is by migrating an existing WPF application or creating a new one. You’ll need the .NET SDK (version 5 or later) installed.
For a New Project: Use the command line or Visual Studio 2022.
dotnet new wpf -n MyModernWpfApp cd MyModernWpfApp dotnet runTo Migrate an Existing