Two Different Eras of Windows App Development
UWP (Universal Windows Platform), introduced with Windows 10 in 2015, was built around a sandboxed AppContainer model, its own Windows.UI.Xaml rendering stack tied to the OS release, and Store-first distribution — it aimed for one binary that scaled across Xbox, HoloLens, phone, and desktop. .NET MAUI (Multi-platform App UI), Microsoft's successor to Xamarin.Forms, instead targets Windows, macOS, iOS, and Android from a single .NET codebase using platform-native controls under the hood, and on Windows specifically renders through WinUI 3 rather than the legacy UWP XAML stack.
Cricket analogy: It's like comparing the old five-day Test-only cricketing era to today's franchise T20 leagues that flex across countries, UWP aimed for one format across many Windows device types, while MAUI flexes across entirely different platforms like Android and iOS.
API Surface and the AppContainer Sandbox
UWP apps run inside a restrictive AppContainer, requiring declared capabilities (like broadFileSystemAccess or documentsLibrary) in the manifest just to touch the file system broadly, and historically could only call WinRT APIs plus a curated subset of Win32 via UWP API contracts. MAUI apps on Windows, by contrast, compile down to a WinUI 3-based unpackaged or packaged app and can call the full .NET desktop API surface plus native Win32 interop directly, trading some sandbox isolation guarantees for unrestricted access to existing libraries, files, and OS features.
Cricket analogy: It's like a fielder restricted to a designated fielding circle during powerplay overs versus one allowed to roam anywhere on the ground once restrictions lift, UWP's AppContainer is the restricted zone, MAUI's desktop access is the open field.
// MAUI: Windows-specific conditional compilation for native interop
#if WINDOWS
using Microsoft.UI.Xaml;
using WinRT.Interop;
public void EnableWindowsFeature(Microsoft.Maui.Controls.Window mauiWindow)
{
var nativeWindow = (Microsoft.UI.Xaml.Window)mauiWindow.Handler.PlatformView;
var hwnd = WindowNative.GetWindowHandle(nativeWindow);
// Direct Win32 interop only reachable on the Windows target
}
#endifDistribution and Microsoft's Current Guidance
Microsoft has stated UWP is in maintenance mode for new feature investment and steers new Windows-only desktop projects toward WinUI 3 (via the Windows App SDK) directly, while steering teams that need to also reach mobile and Mac toward .NET MAUI, which itself uses WinUI 3 as its Windows rendering target — meaning both current recommended paths converge on the same underlying Windows UI engine rather than the older UWP XAML stack. Existing UWP apps continue to run and receive security servicing, but Microsoft's official migration guidance points teams toward Windows App SDK or MAUI rather than porting to a still-supported-but-frozen UWP feature set.
Cricket analogy: It's like a cricket board announcing it will keep honoring existing player contracts from an old academy but is directing all new talent recruitment toward a modernized academy system, UWP apps still run, but new investment flows to WinUI 3 and MAUI.
Both current recommended paths — plain WinUI 3 via Windows App SDK, and .NET MAUI — render Windows UI through the same underlying WinUI 3 engine. The practical decision is not "WinUI vs MAUI" so much as "do I need cross-platform reach (choose MAUI) or Windows-only simplicity (choose WinUI 3 directly)."
Choosing Between Them Today
For a brand-new, Windows-only desktop application, going straight to WinUI 3 via the Windows App SDK is generally the simplest path since it avoids MAUI's cross-platform abstraction overhead entirely. For a team that genuinely needs the same C#/.NET codebase to also ship on iOS, Android, or macOS, MAUI is the pragmatic choice, accepting that platform-specific Windows behavior (like native Win32 interop, tray icons, or multi-window support) may require conditional compilation with #if WINDOWS or platform-specific partial classes.
Cricket analogy: It's like a player deciding whether to specialize purely in Test cricket for one format's mastery, or train as an all-format player able to adapt across T20, ODI, and Test, the choice depends on whether you need to 'ship' across formats.
MAUI's Windows target does not expose 100% of what a plain WinUI 3 app can do out of the box — features like advanced multi-window management, certain tray-icon behaviors, or deep Win32 interop often require dropping into platform-specific code behind #if WINDOWS. Budget time for this before committing a Windows-heavy feature set to MAUI.
- UWP targeted a sandboxed, Store-first, one-binary-many-devices model introduced with Windows 10.
- .NET MAUI is Xamarin.Forms' successor, targeting Windows, macOS, iOS, and Android from one .NET codebase.
- MAUI renders Windows UI through WinUI 3, not the legacy UWP Windows.UI.Xaml stack.
- UWP's AppContainer sandbox requires declared capabilities for broad file system or API access.
- MAUI Windows apps get full .NET desktop API access and native Win32 interop.
- Microsoft considers UWP in maintenance mode and steers new projects to WinUI 3 or MAUI instead.
- Choose WinUI 3 directly for Windows-only apps; choose MAUI when genuine cross-platform reach is required.
Practice what you learned
1. What is .NET MAUI the direct successor to?
2. What does .NET MAUI use to render its UI on the Windows platform?
3. What is required in a UWP app's manifest to access broad areas of the file system?
4. What is Microsoft's current stance on UWP for new Windows desktop projects?
5. Why might a MAUI Windows app need #if WINDOWS conditional compilation blocks?
Was this page helpful?
You May Also Like
WinUI 3 Overview
WinUI 3 is Microsoft's native, open-source UI framework for Windows desktop apps, decoupled from the OS and shipped via the Windows App SDK.
Windows App SDK
The Windows App SDK is Microsoft's unified set of APIs and components for building Win32 and packaged desktop apps outside the UWP sandbox.
UWP Interop with Win32
Techniques for calling native Win32 and COM APIs from UWP apps, and hosting Win32 processes or windows alongside UWP's sandboxed model.
Related Reading
Related Study Notes in Microsoft Technologies
Browse all study notesWindows Batch Scripting Study Notes
Batch · 30 topics
Microsoft TechnologiesMFC (Microsoft Foundation Classes) Study Notes
C++ · 30 topics
Microsoft TechnologiesSilverlight Study Notes
.NET · 30 topics
Microsoft TechnologiesXAML Study Notes
.NET · 30 topics
Microsoft TechnologiesWPF (Windows Presentation Foundation) Study Notes
.NET · 30 topics
Microsoft TechnologiesMVVM Design Pattern Study Notes
.NET · 30 topics