github/awesome-copilot
UWP to WinUI 3 App Migration Guide
About this skill
A reference for migrating UWP apps to WinUI 3 and the Windows App SDK. It maps legacy UWP APIs to their correct equivalents through before-and-after code comparisons, and covers namespace changes (Windows.UI.Xaml to Microsoft.UI.Xaml), threading (CoreDispatcher to DispatcherQueue), window management (CoreWindow to AppWindow), dialogs, pickers, sharing and printing, background tasks, and unit test migration, along with the most common code generation errors.
How do you use this skill?
1. Ask the agent to review your UWP code against the migration guide to verify it uses the correct WinUI 3 APIs instead of legacy patterns.
2. Ask to convert all using directives from the Windows.UI.Xaml.* namespaces to Microsoft.UI.Xaml.*.
3. Ask to replace CoreDispatcher.RunAsync with DispatcherQueue.TryEnqueue, and Window.Current with the static App.MainWindow property.
4. Ask to add XamlRoot to every ContentDialog and to initialize pickers via InitializeWithWindow.Initialize with the window handle.
5. Ask to migrate unit tests to the Unit Test App (WinUI in Desktop) project, using [UITestMethod] for XAML tests.
Example user request: "Review my UWP project and convert it to WinUI 3, fixing dialogs and popups and migrating background tasks according to the checklist."
Requirements and limitations
Requires an understanding of C#, XAML, the .NET framework, and the Windows App SDK. It relies on the SKILL.md file as a text-only reference and does not execute any code. Technical identifiers such as Microsoft.UI.Xaml, DispatcherQueue, AppWindow, and [UITestMethod] are preserved as-is. The skill does not cover migrating every possible API, and some scenarios (such as CoreDispatcher.ProcessEvents) may require manual code restructuring. It does not guarantee compatibility with all project versions or a safe migration without testing.
Installation by agent
Download and extract the ZIP. It contains the folder winui3-migration-guide and the file SKILL.md with the original attachments and license.
GitHub Copilot
- Create this path inside your project if it does not exist:
.github/skills/ - Copy the entire extracted skill folder to this path:
.github/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.
Claude Code
- Create this path inside your project if it does not exist:
.claude/skills/ - Copy the entire extracted skill folder to this path:
.claude/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.
OpenAI Codex
- Create this path inside your project if it does not exist:
.agents/skills/ - Copy the entire extracted skill folder to this path:
.agents/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.
Cursor
- Create this path inside your project if it does not exist:
.cursor/skills/ - Copy the entire extracted skill folder to this path:
.cursor/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.
Devin / Windsurf
- Create this path inside your project if it does not exist:
.devin/skills/ - Copy the entire extracted skill folder to this path:
.devin/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.
Gemini CLI
- Create this path inside your project if it does not exist:
.gemini/skills/ - Copy the entire extracted skill folder to this path:
.gemini/skills/winui3-migration-guide/SKILL.md - Open the project in your agent or refresh the skills list and look for winui3-migration-guide.
- Request the task shown above and select the skill. Grant only necessary permissions.