# WinUI 3 — Modern Native UI Framework for Windows Apps > Build polished Windows desktop applications using Microsoft's latest native UI framework with Fluent Design, XAML, and the Windows App SDK. ## Install Save as a script file and run: # WinUI 3 — Modern Native UI Framework for Windows Apps ## Quick Use ```bash # Requires Visual Studio 2022 with Windows App SDK workload dotnet new winui3 -n MyWinUIApp cd MyWinUIApp dotnet build dotnet run ``` ## Introduction WinUI 3 is Microsoft's native UI framework for building modern Windows desktop and UWP applications. It provides the full Fluent Design System, XAML markup, and a comprehensive control library as part of the Windows App SDK, decoupled from the OS update cycle so developers can ship the latest UI components regardless of the user's Windows version. ## What WinUI 3 Does - Provides the official Fluent Design control library for Windows desktop applications - Ships as a NuGet package via the Windows App SDK, independent of Windows OS releases - Supports XAML markup and C#/C++ for building rich, accessible user interfaces - Includes modern input handling with touch, pen, mouse, and keyboard support - Renders UI using DirectComposition and Direct2D for smooth 60fps animations ## Architecture Overview WinUI 3 is the UI layer of the Windows App SDK (formerly Project Reunion). It sits on top of the Windows composition engine, using DirectComposition for GPU-accelerated rendering and XAML Islands for hosting modern controls. The framework decouples UI components from the OS by shipping as a redistributable package. Applications reference WinUI via NuGet, and the runtime resolves to the installed Windows App SDK version on the target machine. ## Self-Hosting & Configuration - Install Visual Studio 2022 with the Windows App SDK / WinUI workload or use the .NET CLI with WinUI templates - Create a project using `dotnet new winui3` or the Visual Studio project wizard - Add controls via XAML markup or C# code-behind using the `Microsoft.UI.Xaml` namespace - Package for distribution using MSIX for Store deployment or unpackaged for sideloading - Customize Fluent theming through resource dictionaries and the `Application.Resources` section ## Key Features - Complete Fluent Design System with Mica, Acrylic, rounded corners, and smooth animations out of the box - Rich control library: NavigationView, TreeView, InfoBar, BreadcrumbBar, and 60+ controls - Hot Reload for XAML and C# during debugging for rapid UI iteration - Accessibility built in with UI Automation, high contrast themes, and screen reader support - Decoupled from OS releases so apps can use latest controls on older Windows 10 versions ## Comparison with Similar Tools - **WPF** — Mature Windows UI framework; WinUI 3 is its successor with Fluent Design and modern rendering - **UWP** — Sandboxed app model with WinUI 2; WinUI 3 removes sandbox restrictions for desktop apps - **Avalonia** — Cross-platform .NET UI; WinUI 3 is Windows-only but offers deeper OS integration and official Fluent Design - **Electron** — Web-tech desktop apps; WinUI 3 is native with lower memory usage and OS-native look and feel - **MAUI** — Cross-platform .NET framework that uses WinUI 3 on Windows but adds iOS/Android/macOS targets ## FAQ **Q: Does WinUI 3 work on Windows 10?** A: Yes. WinUI 3 supports Windows 10 version 1809 (build 17763) and later through the Windows App SDK. **Q: Can I migrate an existing WPF application to WinUI 3?** A: WinUI 3 XAML is similar but not identical to WPF XAML. Microsoft provides migration guidance and XAML Islands for incremental adoption. **Q: Is WinUI 3 open source?** A: Yes. The WinUI library (microsoft-ui-xaml) is open source under the MIT license on GitHub. **Q: Can I use WinUI 3 with C++ instead of C#?** A: Yes. WinUI 3 supports both C# and C++/WinRT for application development. ## Sources - https://github.com/microsoft/microsoft-ui-xaml - https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ --- Source: https://tokrepo.com/en/workflows/asset-3f30933f Author: Script Depot