Skip to content

[develop] Fix: UWP→WinAppSDK migration — UI, layout & platform#41

Closed
qiutongMS wants to merge 13 commits into
mainfrom
fix/develop/uwp-migration-ui-layout-platform
Closed

[develop] Fix: UWP→WinAppSDK migration — UI, layout & platform#41
qiutongMS wants to merge 13 commits into
mainfrom
fix/develop/uwp-migration-ui-layout-platform

Conversation

@qiutongMS
Copy link
Copy Markdown
Owner

Summary

  • Replace remaining UWP XAML API links with Windows App SDK API links across the targeted UI/layout/platform pages.
  • Migrate WinUI code samples from Windows.UI.Xaml* / Windows::UI::Xaml* to Microsoft.UI.Xaml* in the affected snippets.
  • Swap outdated UWP sample links for current WinUI Gallery and WindowsAppSDK-Samples references.

Validation

  • git diff --check
  • Representative link validation returned HTTP 200 for updated Learn API links and replacement GitHub sample URLs.

Completeness

  • Fix report pages processed: 33
  • Files modified: 32

Skipped Findings

  • hub/apps/develop/ui/windowing-overview.md — the report proposed replacing a note that intentionally compares the UWP Windows.UI.Xaml.Window type with WinUI behavior. Changing that reference would make the note technically incorrect, so the page was intentionally left unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary: I reviewed the latest PR diff and the full modified pages. Most of the migration edits are fine, but four of the new Windows App SDK API links are broken (404), and two of those changes also introduce WinAppSDK/UWP terminology mismatches in the surrounding prose.

Must-fix issues:

  1. hub/apps/develop/launch/handle-file-activation.md (Important APIs; Step 3): the new Microsoft.UI.Xaml.Application.OnFileActivated links point to /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.application.onfileactivated, which returns 404. This leaves both the API list and the step text with a broken Learn link.
  2. hub/apps/develop/launch/handle-uri-activation.md (Important APIs): the new Microsoft.UI.Xaml.Application.OnActivated link points to /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.application.onactivated, which returns 404. The page body still describes OnActivated as a UWP handler later on, so the new link also makes the terminology less coherent.
  3. hub/apps/develop/platform/xaml/events-and-routed-events-overview.md (special hit-testing paragraph): the new MediaElement and WebView links point to /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaelement and /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.webview, both of which return 404. Please replace them with reachable targets (or update the prose to WinAppSDK-supported controls).
  4. hub/apps/develop/ui/controls/navigationview.md (Code example intro): the new Microsoft::UI::Xaml::Interop::TypeName link points to /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.interop.typename, which returns 404.

Because these broken links were introduced by the PR, I can’t approve the current revision yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Review result: CHANGES_REQUESTED\n\nI found one must-fix issue in the latest PR state.\n\n- hub/apps/develop/platform/xaml/xaml-overview.md (Debug XAML section): the updated XamlParseException link was changed to /dotnet/api/Microsoft.UI.Xaml.markup.xamlparseexception?view=dotnet-uwp-10.0&preserve-view=true, but that URL returns 404 on Learn. The previous Windows.UI.Xaml.Markup.XamlParseException API page is the reachable Learn page, and Learn search for this topic still resolves to the Windows.UI type. Please restore a valid target before merge.\n\nI reviewed the latest PR diff and the full modified file content for this finding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary: The PR's Windows App SDK link migration is mostly solid, but I found a few blocking issues in the current page state.

Must-fix issues:

  1. hub/apps/design/layout/attached-layouts.md (around line 243, "The Layout Process"): HorizontalCacheLength links to the VerticalCacheLength API target, so the link target is wrong.
  2. hub/apps/design/layout/attached-layouts.md (around line 254, "The Layout Process"): the prose says GetOrCreateElement, but the linked/member name is GetOrCreateElementAt. That mismatch is technically misleading.
  3. hub/apps/design/layout/attached-layouts.md (around line 627, example code): container = context = context.GetOrCreateElementAt(...) is invalid C# syntax.
  4. hub/apps/design/layout/attached-layouts.md (around line 665, "Scroll Anchoring"): IScrollAnchorPovider is misspelled; it should be IScrollAnchorProvider.
  5. hub/apps/windows-app-sdk/applifecycle/focus-session.md (around line 100, C++/WinRT snippet): #include <winrt/Windows.UI.Shell.h is missing the closing >.

I spot-checked the updated Learn links and the new Windows App SDK links resolve, so the blockers are the content/code issues above.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary:
The PR makes good progress on the UWP→WinUI cleanup, but I found a few blocking documentation regressions in the current PR state.

Must-fix issues:

  1. hub/apps/develop/ui/controls/custom-transport-controls.md — In the Important APIs list, the MediaTransportControls entry still links to /uwp/api/Windows.Media.SystemMediaTransportControls, which is a different API than Microsoft.UI.Xaml.Controls.MediaTransportControls.
  2. hub/apps/develop/ui/controls/custom-transport-controls.md — The updated "Media Transport Controls sample" links now point to WinUI-Gallery/MediaPlayerElementPage.xaml.cs, but that file does not contain the CustomMediaTransportControls example referenced by the page and does not satisfy the page's "download/view/run the sample" promise.
  3. hub/apps/develop/ui/controls/commanding.md — The updated "Download the code for this example" links now point to individual blob files (and the ICommand link points only to AsyncCommand.cs), so readers no longer get the full sample that the page promises.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary: The PR's link targets are generally reachable, but three pages now contain broken prose where inline API references were replaced with raw namespace text. Those regressions hurt readability and remove explanatory content, so the PR should not be approved yet.

Must-fix issues:

  1. hub/apps/design/layout/custom-panels-overview.md — Several sections now contain orphaned lines such as Microsoft.UI.Xaml.FrameworkElement / Microsoft.UI.Xaml.DependencyObject with the surrounding explanatory sentences removed. This breaks multiple paragraphs and lists in the page.
  2. hub/apps/develop/ui/layout-panels.md — The RelativePanel introduction paragraph was replaced by a single Microsoft.UI.Xaml.AdaptiveTrigger line, removing the explanation of what RelativePanel does and how it works with VisualStateManager/AdaptiveTrigger.
  3. hub/apps/develop/ui/controls/custom-transport-controls.md — In "Adding a custom button", the sentence about the AppBarButton reference was replaced by a bare Microsoft.UI.Xaml.Controls line, leaving an obvious content glitch between steps 1 and 2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary:
I found one blocking issue in the latest PR state. Most link and namespace migrations look good, but one edited page now has a broken paragraph in the MeasureOverride section.

Must-fix:

  1. hub/apps/design/layout/boxpanel-example-custom-panel.md — around line 124 / section "MeasureOverride": the page now contains a stray standalone line Microsoft.UI.Xaml.FrameworkElement. This replaces part of the explanatory prose and breaks the flow of the section for readers. Please restore a coherent explanation (or remove the stray line) before merging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary

I reviewed the latest PR diff and the full modified pages. Most link updates look good, but two modified pages still contain blocking correctness/syntax issues that should be fixed before merge.

Must-Fix Issues

# File Line/Section Issue Severity
1 hub/apps/develop/launch/handle-uri-activation.md Line 137 / Step 3 code sample The C# sample ends with var success = await Windows.System.Launcher.LaunchUriAsync(uri) and is missing the trailing semicolon, so the snippet is not valid C#. must-fix
2 hub/apps/develop/ui/controls/navigationview.md Line 406 / Code example The prose now names Microsoft::UI::Xaml::Interop::TypeName but still links to the UWP Windows.UI.Xaml.Interop.TypeName API, and the adjacent [Type]() link is empty. This leaves a broken markdown link and mismatched API reference in the same sentence. must-fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Review summary: most of the API/link migrations look good, but I found two blocking reader-facing link issues before this can be approved.

Must-fix issues:

  1. hub/apps/develop/data-binding/data-binding-in-depth.md (Sample apps that demonstrate {x:Bind}): the "XAML UI Basics sample" link now points to BindingPage.xaml, which is the same destination as the "{x:Bind} sample" link and does not match the link text/promise.
  2. hub/apps/develop/launch/handle-file-activation.md (Related content): the "Association launching sample" link now points to a single MainWindow.xaml.cs file inside a broader activation sample, so readers lose the sample/project/manifest context needed for file-association setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary:
I found two blocking documentation issues in the latest PR state. Most of the mechanical UWP→WinAppSDK link and namespace updates look good, but these two changes should be corrected before approval.

Must-fix issues:

  1. hub/apps/develop/platform/xaml/xaml-overview.md (Optimize your XAML for load performance, around line 237): The new xref was changed to Microsoft.UI.Xaml.DebugSettings.IsOverdrawHeatMapEnabled, but the Windows App SDK API docs do not publish that member as a documented Microsoft.UI.Xaml property page/class member. The previous Windows.UI.Xaml property page exists, while the direct Microsoft.UI.Xaml property URL returns 404 and the Microsoft.UI.Xaml.DebugSettings class page does not list this property. This risks creating an unresolved/broken xref.
  2. hub/apps/develop/platform/xaml/xaml-namespaces-and-namespace-mapping.md (Code namespaces that map to the default XAML namespace, lines 45-70): The updated namespace list was migrated to Microsoft.UI.Xaml*, but the surrounding page still explicitly frames the topic in Windows Runtime app terms (lines 35-43). As written, the article now states these namespaces are "currently mapped" without telling readers whether the list is for UWP, WinUI 3, or both, which makes the page internally inconsistent and misleading.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Review result: APPROVED

I reviewed the latest PR diff and the full modified files only. The UWP→Windows App SDK API link updates, namespace migrations, and sample link replacements are technically consistent, the updated links I spot-checked are reachable, and I did not find any new issues that should block merge.

Qiutong Shen and others added 2 commits May 20, 2026 10:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Review Result: APPROVED

Summary

Reviewed the full latest diff for PR #41 across 37 modified pages. The UWP→WinUI 3 namespace/API-link migrations are technically sound, updated links resolve, markdown/code remain valid, and I found no must-fix issues in the latest diff.

Must-Fix Issues

None.

Suggestions

# File Line/Section Suggestion Severity
1 hub/apps/develop/ui/controls/commanding.md Front matter line 1 The file now includes a UTF-8 BOM. It doesn't block approval, but removing it would avoid noisy future diffs if the repo prefers BOM-free Markdown. suggestion

Page Health Assessment

File Overall Quality Notes
hub/apps/design/layout/attached-layouts.md ✅ Good API link migration is consistent and coherent.
hub/apps/design/layout/boxpanel-example-custom-panel.md ✅ Good Namespace/link updates align with sample prose.
hub/apps/design/layout/custom-panels-overview.md ✅ Good Panel/FrameworkElement links and terminology are consistent.
hub/apps/desktop/modernize/ui/apply-mica-win32.md ✅ Good Link update is correct and non-disruptive.
hub/apps/develop/data-binding/data-binding-in-depth.md ✅ Good Binding references and sample links are consistent.
hub/apps/develop/launch/handle-file-activation.md ✅ Good Mixed UWP/WinUI guidance remains technically correct.
hub/apps/develop/launch/handle-uri-activation.md ✅ Good Activation guidance and added WinUI note align.
hub/apps/develop/platform/xaml/3-d-perspective-effects.md ✅ Good Projection/compositor references resolve correctly.
hub/apps/develop/platform/xaml/custom-attached-properties.md ✅ Good Namespace and API references are coherent.
hub/apps/develop/platform/xaml/custom-dependency-properties.md ✅ Good Dependency property references remain aligned with prose.
hub/apps/develop/platform/xaml/events-and-routed-events-overview.md ✅ Good Updated WinUI API links are valid and consistent.
hub/apps/develop/platform/xaml/xaml-overview.md ✅ Good Small link adjustment is correct.
hub/apps/develop/platform/xaml/xaml-resource-dictionary.md ✅ Good ResourceDictionary references are accurate.
hub/apps/develop/platform/xaml/xaml-styles.md ✅ Good Style API link update is correct.
hub/apps/develop/ui/controls/buttons.md ✅ Good Button-related API references are valid.
hub/apps/develop/ui/controls/commanding.md ✅ Good ICommand terminology, sample references, and links are aligned.
hub/apps/develop/ui/controls/controls-and-events-intro.md ✅ Good Control/event references migrated cleanly.
hub/apps/develop/ui/controls/custom-transport-controls.md ✅ Good MediaPlayerElement-related links and code context still match.
hub/apps/develop/ui/controls/date-and-time.md ✅ Good Updated control sample links resolve.
hub/apps/develop/ui/controls/dialogs-and-flyouts/dialogs.md ✅ Good Dialog API references remain valid.
hub/apps/develop/ui/controls/flipview.md ✅ Good Sample link update is correct.
hub/apps/develop/ui/controls/item-containers-templates.md ✅ Good ItemsRepeater/ListView/GridView references are coherent.
hub/apps/develop/ui/controls/item-templates-gridview.md ✅ Good GridView sample link remains valid.
hub/apps/develop/ui/controls/item-templates-listview.md ✅ Good ListView sample link remains valid.
hub/apps/develop/ui/controls/lists.md ✅ Good List control references are technically correct.
hub/apps/develop/ui/controls/menus.md ✅ Good Menu-related API/sample references are consistent.
hub/apps/develop/ui/controls/navigationview.md ✅ Good NavigationView link updates are correct.
hub/apps/develop/ui/controls/person-picture.md ✅ Good Updated API/sample references are valid.
hub/apps/develop/ui/controls/radio-button.md ✅ Good Small API link update is correct.
hub/apps/develop/ui/controls/rich-edit-box.md ✅ Good Updated links remain accurate.
hub/apps/develop/ui/controls/text-box.md ✅ Good Updated links remain accurate.
hub/apps/develop/ui/controls/tree-view.md ✅ Good TreeView references and prose still align.
hub/apps/develop/ui/display-ui-objects.md ✅ Good Display object references are valid.
hub/apps/develop/ui/layout-panels.md ✅ Good Layout panel link migrations are consistent.
hub/apps/develop/ui/navigation/navigate-between-two-pages.md ✅ Good Frame/navigation API updates remain coherent.
hub/apps/develop/ui/navigation/navigation-history-and-backwards-navigation.md ✅ Good Backstack-related references are technically correct.
hub/apps/windows-app-sdk/applifecycle/focus-session.md ✅ Good Lifecycle API link updates are valid.

Comment thread hub/apps/develop/ui/controls/person-picture.md
private void BoldButton_Click(object sender, RoutedEventArgs e)
{
Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection;
Microsoft.UI.Text.ITextSelection selectedText = editor.Document.Selection;
Copy link
Copy Markdown
Owner Author

@qiutongMS qiutongMS May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行的缩进没问题吗?包括这里上下的几行和挨着的几个文件

@qiutongMS qiutongMS force-pushed the fix/develop/uwp-migration-ui-layout-platform branch from 9efa89d to a874e66 Compare May 21, 2026 02:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS
Copy link
Copy Markdown
Owner Author

Split into 3 smaller PRs: #45, #46, #47

@qiutongMS qiutongMS closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants