WinUI 3 Preview
A Visual Studio Code extension that renders a live visual preview of WinUI 3 XAML files without running the app.

Open a .xaml file and use Preview XAML from the editor title bar or the command palette. The markup is parsed and shown as HTML in a webview, so you can inspect layout and controls while you edit.
Features
- Preview
Page, UserControl, and Window XAML in the sidebar or in an editor tab
- Refresh the preview when you save the file or switch to another XAML editor
- Hover a control in the preview to highlight it
- Open the matching
.xaml.cs code-behind with View Code
- Resolve local images, including
ms-appx:/// paths
- Apply styles and resources from the workspace when they can be resolved
The preview covers common WinUI 3 layouts and controls, including Grid, StackPanel, NavigationView, ListView, buttons, text inputs, pickers, and more.
Usage
- Open a
.xaml file.
- Run Preview XAML, or click the preview icon in the editor title bar.
- Edit and save the file to update the preview.
Settings
| Setting |
Description |
Default |
winui-3-preview.openTarget |
Open the preview in the sidebar activity bar panel or in an editor tab |
sidebar |
winui-3-preview.hoverShadowColor |
Highlight color when hovering a control in the preview |
#7c3aed |
winui-3-preview.showUnknownTags |
Show unrecognized XAML tags in the Output channel |
false |
How to submit issues
To make sure your issue is addressed, post a screenshot containing the controller you with to see rendered, how it currently is being rendered and how it should be rendered, and the XAML of that controller.
Debug information shown in the output panel also helps, if you have it enabled.
Rafael Muricy.