Edit

Use modern Windows features in desktop apps

You don't need to rewrite your WPF, Windows Forms, or Win32 app to take advantage of modern Windows features. The Windows App SDK and the broader Windows platform offer modular capabilities you can adopt incrementally, at your own pace.

This article provides an overview of modern features that you can add to your desktop app by using:

  • Windows Runtime (WinRT) APIs in the Windows SDK
  • The Windows App SDK
  • MSIX packaging or package identity

Note

There are other aspects of app modernization that aren't covered here, like updating to a newer version of .NET or Visual Studio tooling. For more information about those aspects of modernization, start with:

Windows Runtime APIs

Many Windows platform features — app notifications, the share contract, Bluetooth, and more — are exposed through Windows Runtime (WinRT) APIs. You can call these APIs directly from WPF, Windows Forms, and C++ Win32 apps.

The first step in adding modern features to your app is configuring your project to use WinRT APIs. For instructions, see:

Windows App SDK

The Windows App SDK is how many modern Windows platform features are shipped. You can use the Windows App SDK in your existing app without changing your UI framework.

Important

These APIs use the WinRT API model, so be sure you've also configured your project to use WinRT APIs.

Add the Windows App SDK NuGet package and call its APIs alongside your existing code. For instructions, see:

App packaging

Packaging defines how your app is installed, updated, and integrated with Windows. Choosing between a packaged or unpackaged app affects the features you can use, the deployment model you rely on, access to the Microsoft Store and enterprise deployment pipelines, and the overall experience your customers get.

For more information, see:

Package with MSIX

Packaging your app with MSIX replaces your current installer. It gives you a modern, reliable installation experience, clean uninstall, automatic updates, and package identity. MSIX packaging is separate from modernizing your app's code — you can package a WPF, WinForms, or Win32 app with MSIX without changing any source code.

For more information, see:

Features that require package identity

Some Windows platform features — including background tasks, app extensions, sharing targets, Windows AI Foundry APIs, file associations, and startup tasks — require your app to have a package identity at runtime. If you want to keep your current installer, you can still grant identity to an unpackaged app without full MSIX packaging. This approach is sometimes called a sparse package or packaging with external location.

For more information, see:

Add modern features

Many features in Features for Windows app development are available for WPF, WinForms, and Win32 apps. You can browse that section, or use this non-comprehensive list to jump directly to some common features.

Migrate to WinUI 3

If you're planning a larger modernization effort — or building new features as separate modules — consider building new components with WinUI 3 and the Windows App SDK. WinUI 3 is the modern native UI framework for Windows desktop apps and is the recommended path for new development.

See Create your first WinUI 3 app to get started.