Access to this page requires authorization. You can try
.
Access to this page requires authorization. You can try
This article contains the information you need to get started building apps for Windows.
Windows offers a wide range of languages, frameworks, and tools for building apps, including WinUI, React Native for Desktop, WPF, C++, C#, .NET, and a variety of cross-platform frameworks. Here, we provide information to help you decide which option is best for you.
WinUI
We recommend WinUI and the Windows App SDK to create apps that look great and take advantage of the latest Windows releases. If you're new to Windows development, or starting work on a new Windows app, WinUI provides the resources you need to create great
apps for Windows 11
.
WinUI
is a XAML markup-based user interface layer that contains modern controls and styles for building Windows apps. As the native UI layer for the Windows App SDK, it embodies
Fluent Design
, giving each Windows app the polished feel that customers expect.
Get started with WinUI
The
Windows App SDK
is a set of new developer components and tools that represent the latest evolution in the Windows app development platform. The Windows App SDK provides a unified set of APIs and tools that can be used in a consistent way by desktop apps on Windows 11 and downlevel to Windows 10, version 1809.
While WinUI is the native UI layer, you can use the Windows App SDK with WPF, WinForms, or Win32 apps. If you've developed apps for Windows before, but are looking to get started with the Windows App SDK in an existing app, see
Framework-specific guides
.
React Native for Desktop
React Native
is a development platform which allows building cross-platform apps.
React Native for Desktop
encompasses React Native for Windows and macOS, bringing React Native support to the Windows SDK. React Native for Desktop lets you use JavaScript to build native Windows apps for all devices supported by Windows 10 and Windows 11. This includes PCs, tablets, 2-in-1s, Xbox, Mixed Reality devices, etc.
With React Native for Desktop, you write most or all of your app code in JavaScript - or TypeScript - and the framework produces a native UWP XAML application. If your app needs to call a platform API, you can usually do so through one of the many
community modules
, or if a module does not yet exist, you can easily
write a native module to expose it
.
Here are some reasons to choose React Native for Desktop:
You want to share code across platforms as much as possible, or you have web properties that you want to share code with.
Improved developer productivity and inner loop, thanks to fast refresh.
Your app's fundamentals (performance, accessibility, internationalization) are as good as a native UWP app.
You have experience with and a preference for JavaScript or TypeScript
You would like to leverage JavaScript-only libraries on
npmjs.com
, and many native libraries too.
Your app will use the native controls, visual appearance, animations and colors, and therefore will feel integrated into the design language used in Windows. In addition, React Native for Desktop apps do not have to compromise on the set of APIs they can call, as the framework allows you to call platform APIs as well as write your own view managers and native modules.
Large and growing community momentum, with lots of
community modules
.
Get started with React Native for Desktop
For more information about React Native for Desktop, see the following links:
React Native for Windows repo on GitHub
React Native for macOS repo on GitHub
API reference
React Native for Desktop resources
WPF is a well-established framework for Windows desktop applications with access to
.NET
or the
.NET Framework
. Like WinUI, it also uses XAML markup to separate UI from code. WPF provides a comprehensive set of application development features that include controls, data binding, layout, 2D and 3D graphics, animation, styles, templates, documents, media, text, and typography. WPF is part of .NET, so you can build applications that incorporate other elements of the .NET API.
Additionally, you can now integrate a sandbox environment into your packaged WPF applications, providing an additional layer of security. This enhancement requires little to no change to your code, thanks to the new
Win32 App Isolation
security feature.
If you've already invested in WPF, you can continue to use it and take advantage of the modernization options in .NET 9. You can build your apps knowing that Microsoft is continuing to invest in WPF. See the
Windows developer FAQ
for more information.
Get started with WPF
If you have a
WPF .NET
app, you also have access to modern Windows platform features and APIs provided by the
Windows App SDK
. For more information, see
Use the Windows App SDK in a WPF app
and
Modernize your desktop apps
.
If you need more help deciding which framework is the best choice for your app, see the
Choose the best application framework for a Windows development project
training module.
Many apps for Windows are written using
Win32
,
Windows Forms
, or
UWP
. Each of these frameworks is supported and will continue to receive bug, reliability, and security fixes, but varying levels of investment for new features and styles. For more information about these app types see the following tabs.
Win32
Windows Forms
Win32 desktop apps (also sometimes called
classic desktop apps
) are the original app type for native Windows applications that require direct access to Windows and hardware. This makes Win32 the app type of choice for applications that need the highest level of performance and direct access to system hardware.
Using the Win32 API with C++ makes it possible to achieve the highest levels of performance and efficiency by taking more control of the target platform with un-managed code than is possible on a managed runtime environment like WinRT and .NET. However, exercising such a level of control over your application's execution requires greater care and attention to get right, and trades development productivity for runtime performance.
Here are a few highlights of what the Win32 API and C++ offers to enable you to build high-performance applications.
Hardware-level optimizations, including tight control over resource allocation, object lifetimes, data layout, alignment, byte packing, and more.
Access to performance-oriented instruction sets like SSE and AVX through intrinsic functions.
Efficient, type-safe generic programming by using templates.
Efficient and safe containers and algorithms.
DirectX, in particular Direct3D and DirectCompute.
Use
C++/WinRT
to create modern desktop Win32 apps with first-class access to Windows Runtime (WinRT) APIs.
Additionally, you can now integrate a sandbox environment into your Win32 applications, providing an additional layer of security. This enhancement requires little to no change to your code, thanks to the new
Win32 App Isolation
security feature.
Get started with Win32
You also have access to modern Windows platform features and APIs provided by the
Windows App SDK
. For more information, see
Use the Windows App SDK in an existing project
and
Modernize your desktop apps
.
Windows Forms is the original platform for managed Windows applications with a lightweight UI model and access to
.NET
or the
.NET Framework
. It excels at enabling developers to quickly get started building applications, even for developers new to the platform. This is a forms-based, rapid application development platform with a large built-in collection of visual and non-visual drag-and-drop controls. Windows Forms does not use XAML, so deciding later to rewrite your application to WinUI entails a complete re-write of your UI.
Additionally, you can now integrate a sandbox environment into your packaged Windows Forms applications, providing an additional layer of security. This enhancement requires little to no change to your code, thanks to the new
Win32 App Isolation
security feature.
Get started with Windows Forms
If you have a
Windows Forms .NET
app, you also have access to modern Windows platform features and APIs provided by the
Windows App SDK
. For more information, see
Use the Windows App SDK in a Windows Forms (WinForms) app
and
Modernize your desktop apps
.
The Universal Windows Platform (UWP) provides a common type system, APIs, and application model for all devices in the Universal Windows Platform. Not only can you use UWP to create desktop applications for Windows PCs, but UWP is also the only supported platform to write a single native universal app that runs across Xbox, HoloLens, and Surface Hub. UWP apps can be native or managed.
Your existing UWP app will continue to function as expected. However, to take advantage of modern features in
WinUI 3
and the
Windows App SDK
we recommend migrating your app.
Get started with UWP
You will not have access to the APIs provided by the
Windows App SDK
or .NET 6 and later. To use the Windows App SDK, you will have to migrate your UWP app to WinUI and the Windows App SDK. For more information, see
Migrate to the Windows App SDK
.
If you need your app to be cross-platform, in addition to React Native for Desktop, you should consider
.NET MAUI
,
Blazor Hybrid
, or a
Progressive Web App (PWA)
. There are many other choices available (
here's a list of popular options
), but these are some good starting points.
.NET MAUI harnesses the power of WinUI on Windows, while also enabling execution on other operating systems. Blazor Hybrid blends desktop and mobile native client frameworks with .NET and Blazor. Another cross-platform option, Progressive Web Apps (PWAs), are websites that function like installed, native apps on Windows and other supported platforms, while functioning like regular websites on browsers.
For more information, see the following tabs.
.NET MAUI
Blazor Hybrid
Progressive Web Apps (PWAs)
.NET Multi-platform App UI (MAUI) is an open-source, cross-platform framework for building Android, iOS, macOS, and Windows applications that leverage the native UI and services of each platform from a single .NET code base. Because .NET MAUI favors platform native experiences, it uses WinUI and the Windows App SDK so apps get the latest user experience on Windows. This gives your apps access to everything you get with WinUI plus the ability to reach to other platforms.
.NET MAUI for Windows is a great choice if:
You want to share as much .NET code as possible across mobile and desktop applications.
You want to ship your application beyond Windows to other desktop and mobile targets with native platform experiences.
You want to use C# and/or XAML for building cross-platform apps.
You're using Blazor for web development and wish to include all or part of that in a mobile or desktop application.
Get started with .NET MAUI
For more information about .NET MAUI, see the following links:
.NET MAUI documentation
.NET MAUI on GitHub
.NET MAUI Product Roadmap
Build Windows apps with .NET MAUI
Resources for learning .NET MAUI
Video Series - .NET MAUI for Beginners
Build 2022: Build native apps for any device with .NET and Visual Studio
In an ASP.NET Core Blazor Hybrid app,
Razor components
run natively on the desktop or mobile device. Components render to a custom embedded Web View control through a local interop channel. The components don't run in the browser, and WebAssembly isn't used. Components have full access to the native capabilities of the device through the .NET platform. All component styles rendered in a Web View are platform dependent. If you're planning to deploy across multiple platforms, you may have to account for rendering differences across the platforms using custom stylesheets.
Blazor Hybrid apps can be built using .NET MAUI, WPF, or Windows Forms. Visual Studio provides a template for creating a Blazor Hybrid app using .NET MAUI. You can also create a Blazor Hybrid app using WPF or Windows Forms by adding a BlazorWebView control to your existing WPF or Windows Forms app. See the links below for more information.
Blazor Hybrid is a great choice if:
Your team is already familiar with ASP.NET Core, Razor components, and CSS.
You want to use C# and/or Razor components for building cross-platform apps.
You want to share as much .NET code (and Razor components) as possible across applications.
You want to ship your application beyond Windows to other desktop and mobile targets with native platform experiences.
You have existing .NET MAUI, WPF, or Windows Forms apps and want to add Blazor components to them.
For more information about Blazor Hybrid, see the following links:
ASP.NET Core Blazor Hybrid documentation
Build a .NET MAUI Blazor Hybrid app
Build a Windows Presentation Foundation (WPF) Blazor app
Build a Windows Forms Blazor app
Troubleshoot ASP.NET Core Blazor Hybrid
BlazorWebView Class
Progressive Web Apps (PWAs)
provide access to open web technologies to provide cross-platform interoperability. PWAs provide your users with an app-like experience that's customized for their devices. PWAs are websites that are
progressively enhanced
to function like installed, native apps on supporting platforms (including Windows), while functioning like regular websites on other browsers.
When installed on Windows, PWAs are just like other apps. For example:
A PWA can be added to the Start menu.
A PWA can be pinned to the Taskbar.
PWAs can handle files.
PWAs can run when the user signs in.
PWAs can be submitted to the Microsoft Store where millions of Windows users can discover and easily install them alongside other Windows apps.
Get started with PWAs
For more information about building PWAs, see the following links:
Overview of PWAs
Publish a PWA to the Microsoft Store
Re-engage users with badges, notifications, and push messages
Build PWA-driven widgets
Progressive Web App demos
PWABuilder - Helping developers build and publish PWAs
App development framework feature comparison
There is a wide range of options for developing applications for Windows. The best option for you depends on your application requirements, your existing code, and your familiarity with the technology. The following table lists the most popular app development frameworks available on Windows and the features supported by each framework.
Feature
.NET MAUI
Blazor Hybrid
React Native for Desktop
UWP XAML (Windows.UI.Xaml)
Win32 (MFC or ATL)
Windows Forms
WinUI 3
React Native for Desktop
Universal Windows Platform (UWP)
Recommendations for Choosing Between ATL and MFC
Windows Forms
Windows Presentation Foundation (WPF)
WinUI in the Windows App SDK (WinUI 3)
Next steps
Use WinUI to start developing apps for Windows
WinUI is our recommended platform for Windows apps, and these steps will quickly get you started.
Set up your development environment on Windows
Windows isn't just great for developing apps that run on Windows, it's also a powerful environment for developing apps for any platform. Learn more about the tools and options available to maximize your development.