You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WinUI 3 shares many XAML concepts with WPF and is optimized for modern Windows experiences. This topic maps common WPF patterns to their WinUI 3 equivalents to help you plan your migration.
WinUI 3 shares many XAML concepts with WPF and is optimized for modern Windows experiences. Most WPF patterns have direct equivalents in WinUI 3. In some areas WinUI 3 introduces an improved approach that replaces an older pattern, and in a few cases features are still in active development.
This topic maps common WPF patterns to their WinUI 3 equivalents so you can plan your migration.
WinUI 3 does not include a built-in DataGrid. The community-maintained WinUI.TableView is one option. Evaluate community projects based on your support and maintenance requirements.
Use RichTextBlock for read-only rich text display. WinUI 3 takes a different approach to document content that is better suited to modern app scenarios.
WinUI 3's PasswordBox provides password masking. SecureString is deprecated in .NET 5+; the recommended approach is to minimize how long credentials are held in memory using ReadOnlySpan<char> patterns.
WebView2 uses the modern Microsoft Edge (Chromium) engine and is the recommended approach for embedding web content across all desktop app types.
XAML features
WinUI 3 XAML uses the same core concepts as WPF — resource dictionaries, styles, data binding, and markup extensions all work similarly. Some WPF-specific patterns have evolved into improved, more composable alternatives.
WinUI 3 uses attached behaviors rather than inline triggers. The XAML Behaviors package supports DataTriggerBehavior, EventTriggerBehavior, and more. Behaviors are more composable and unit-testable than WPF triggers.
ThemeResource provides runtime resource lookup and responds automatically to theme changes (light, dark, high contrast). Use StaticResource for values that never change at runtime.
Use a multi-value converter with individual bindings, or use x:Bind with a computed property on your view model. x:Bind is compiled and type-safe, which makes it more performant than Binding.
Style with BasedOn
✅ Supported
Style inheritance with BasedOn works in WinUI 3.
Implicit styles
✅ Supported
Resource dictionary implicit styles (styles without x:Key) work as expected.
WinUI 3 has no adorner layer equivalent. Use a Canvas or Grid overlay in your layout to achieve similar visual decoration effects — this approach is more explicit and easier to reason about.
Modern .NET async patterns are the right approach in WinUI 3. Task, CancellationToken, and IProgress<T> cover all BackgroundWorker scenarios and integrate naturally with x:Bind.
App model and lifecycle
WPF concept
WinUI 3 equivalent
Notes
Application.Startup / Exit events
App.OnLaunched / Window.Closed
WinUI 3 uses OnLaunched in App.xaml.cs as the entry point. Per-window teardown is handled in Window.Closed.
Application.Current.MainWindow
Your Window instance
Hold a reference to your window instance in App.xaml.cs and expose it as a property.
WinUI 3 windows are customized through AppWindow (title bar, presenter, overlapped/fullscreen/compact overlay modes) rather than subclassing. See Manage app windows.
Full printing support is available via PrintManager. See Print from your app.
Developer tooling
WPF tooling
WinUI 3 status
Notes
XAML Designer (Design tab)
Not yet supported
The Visual Studio XAML Designer doesn't currently support WinUI 3 projects. XAML Hot Reload is supported and is the recommended way to iterate on layout and styles without stopping the debugger.
Blend for Visual Studio
⚠️ Limited support
Blend ships with Visual Studio and can open WinUI 3 projects. The XAML Document Outline is functional, but Design view is not available for WinUI 3.