[Skills] Update WinUI3 migration skills to add more migration mapping item#47043
Open
[Skills] Update WinUI3 migration skills to add more migration mapping item#47043
Conversation
…and Uno article mappings
Restructure the skill as a "migration contract" that captures human judgment
once and applies it consistently across every file. Add comprehensive mappings
from the Uno Platform WPF-to-WinUI reference article.
Key additions:
- Migration Contract: 20+ prohibited patterns (architecture, XAML, code-behind, resources)
- Control Replacements table: 19 WPF controls with no 1:1 WinUI mapping
- No-Equivalent Patterns: MultiBinding, Adorners, RoutedUICommand, StateTrigger
- Event Replacements: full Mouse→Pointer + Preview event removal mappings
- Property Replacements: Visibility.Hidden, Focusable, TextWrapping, ContextMenu
- Binding comparison: {Binding} vs {x:Bind} feature table
- Complete Find-and-Replace reference: 22 XAML + 18 code-behind mechanical replacements
- StateTrigger pattern: simpler DataTrigger replacement alongside ControlTemplate approach
- Implicit styles BasedOn warning, XamlControlsResources ordering, Visibility.Hidden detail
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dance to XAML migration Address niels9001's PR #46462 review comments by adding: - WindowEx from WinUIEx as preferred Window replacement with property mapping table - Page-in-Window architecture pattern for regaining FrameworkElement capabilities - CommunityToolkit.WinUI callout for WPF replacement controls and helpers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
…Control Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
niels9001
reviewed
Apr 16, 2026
|
|
||
| These controls exist in both frameworks with the same name — change `System.Windows.Controls` to `Microsoft.UI.Xaml.Controls`: | ||
|
|
||
| `Button`, `TextBox`, `TextBlock`, `ComboBox`, `CheckBox`, `ListBox`, `ListView`, `Image`, `StackPanel`, `Grid`, `Border`, `ScrollViewer`, `ContentControl`, `UserControl`, `Page`, `Frame`, `Slider`, `ProgressBar`, `ToolTip`, `RadioButton`, `ToggleButton` |
Collaborator
There was a problem hiding this comment.
Suggested change
| `Button`, `TextBox`, `TextBlock`, `ComboBox`, `CheckBox`, `ListView`, `Image`, `StackPanel`, `Grid`, `Border`, `ScrollViewer`, `ContentControl`, `UserControl`, `Page`, `Frame`, `Slider`, `ProgressBar`, `ToolTip`, `RadioButton`, `ToggleButton` |
We should NOT be using ListBox ever in WinUI (as it's deprecated). Instead, we should be using ListView or ItemsView
niels9001
reviewed
Apr 16, 2026
|
|
||
| | WPF Control | WinUI 3 Replacement | Package / Notes | | ||
| |-------------|---------------------|-----------------| | ||
| | `DataGrid` | `DataGrid` | `CommunityToolkit.WinUI.UI.Controls` — similar API, not identical | |
Collaborator
There was a problem hiding this comment.
We should be using: https://github.com/w-ahmad/WinUI.TableView
The Community Toolkit DataGrid has been deprecated
niels9001
reviewed
Apr 16, 2026
| | `DocumentViewer` | `WebView2` | `Microsoft.Web.WebView2` — render PDFs/XPS | | ||
| | `FlowDocument` | `RichTextBlock` | Partial replacement only | | ||
| | `RichTextBox` | `RichEditBox` | Rich text editing | | ||
| | `WrapPanel` | `WrapPanel` | `CommunityToolkit.WinUI.UI.Controls` | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | `WrapPanel` | `WrapPanel` | `CommunityToolkit.WinUI.UI.Controls` | | |
| | `WrapPanel` | `WrapPanel` | `CommunityToolkit.WinUI.Controls` | |
niels9001
reviewed
Apr 16, 2026
| | `FlowDocument` | `RichTextBlock` | Partial replacement only | | ||
| | `RichTextBox` | `RichEditBox` | Rich text editing | | ||
| | `WrapPanel` | `WrapPanel` | `CommunityToolkit.WinUI.UI.Controls` | | ||
| | `UniformGrid` | `UniformGrid` | `CommunityToolkit.WinUI.UI.Controls` | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | `UniformGrid` | `UniformGrid` | `CommunityToolkit.WinUI.UI.Controls` | | |
| | `UniformGrid` | `UniformGrid` | `CommunityToolkit.WinUI.Controls` | |
niels9001
reviewed
Apr 16, 2026
| | `RichTextBox` | `RichEditBox` | Rich text editing | | ||
| | `WrapPanel` | `WrapPanel` | `CommunityToolkit.WinUI.UI.Controls` | | ||
| | `UniformGrid` | `UniformGrid` | `CommunityToolkit.WinUI.UI.Controls` | | ||
| | `DockPanel` | `DockPanel` | `CommunityToolkit.WinUI.UI.Controls` | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | `DockPanel` | `DockPanel` | `CommunityToolkit.WinUI.UI.Controls` | | |
| | `DockPanel` | `DockPanel` | `CommunityToolkit.WinUI.Controls` | |
niels9001
reviewed
Apr 16, 2026
| | WPF Control | WinUI 3 Replacement | Package / Notes | | ||
| |-------------|---------------------|-----------------| | ||
| | `DataGrid` | `DataGrid` | `CommunityToolkit.WinUI.UI.Controls` — similar API, not identical | | ||
| | `Ribbon` | `CommandBar` or `NavigationView` | No Ribbon in WinUI | |
Collaborator
There was a problem hiding this comment.
There is a (partial) replacement in Community Toolkit Labs: https://github.com/CommunityToolkit/Labs-Windows/tree/main/components/Ribbon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed