Skip to content

[develop] Fix: Compile-breaking syntax and malformed markup in samples#15

Open
qiutongMS wants to merge 4 commits into
docsfrom
fix/develop/compile-breaking-syntax-and-malformed-markup
Open

[develop] Fix: Compile-breaking syntax and malformed markup in samples#15
qiutongMS wants to merge 4 commits into
docsfrom
fix/develop/compile-breaking-syntax-and-malformed-markup

Conversation

@qiutongMS
Copy link
Copy Markdown
Owner

Summary

  • fix compile-breaking syntax issues across affected C#, C++/WinRT, and XAML samples
  • correct malformed XML/XAML markup in manifest and layout snippets
  • keep the changes limited to the documented sample issues from the fix report

@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary:
Most edits look like valid syntax and markup corrections, but one changed C# sample still uses the wrong URI type and remains non-compilable as written.

Must-fix issues:

  1. hub/apps/develop/windows-integration/click-to-do.md (Launch Click to Do, C# tab): the updated snippet still constructs new Windows.Foundation.Uri("ms-clicktodo://"). In C#, Windows.System.Launcher.LaunchUriAsync expects System.Uri (new Uri("ms-clicktodo://")), so the sample remains technically incorrect after this PR.

@qiutongMS
Copy link
Copy Markdown
Owner Author

Review Result: CHANGES_REQUESTED

Summary

I found one blocking issue in hub/apps/windows-app-sdk/applifecycle/applifecycle-instancing.md. Most of the syntax/markup fixes look good, but the C# sample in the "Redirection without blocking" section now uses method-call syntax for WinRT properties.

Must-Fix Issues

  1. hub/apps/windows-app-sdk/applifecycle/applifecycle-instancing.md — In the C# WPF sample under Redirection without blocking, args.Kind() and keyInstance.IsCurrent() are incorrect in C#. These APIs are properties (args.Kind and keyInstance.IsCurrent), so the current snippet will not compile as written.

@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary:
Most edits look like valid syntax/markup fixes, but the PR should not be merged yet because one modified page still has multiple C++/WinRT snippets mislabeled as C# and one edited snippet still carries a C# filename comment.

Must-fix issues:

  1. hub/apps/develop/feeds/implement-feed-provider-win32.md — Sections "OnFeedProviderEnabled", "OnFeedProviderDisabled", "OnFeedEnabled, OnFeedDisabled", and "OnCustomQueryParametersRequested": this is a C++/WinRT article, but several code fences still use ```csharp and the edited snippet still begins with // FeedProvider.cs even though the code is C++. Please make the language/file labeling consistent throughout the page.

Qiutong Shen and others added 3 commits May 11, 2026 17:07
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS qiutongMS force-pushed the fix/develop/compile-breaking-syntax-and-malformed-markup branch from 0544d1f to 8975585 Compare May 11, 2026 09:07
@qiutongMS
Copy link
Copy Markdown
Owner Author

Summary: I found one blocking documentation issue. Most edits correctly fix syntax and markup problems, but one modified page still contains a procedural contradiction that would mislead readers following the tutorial.

Must-fix issues:

  1. hub/apps/develop/security/share-certificates.md — In the "Create and publish a secured web service" section, the page says that browsing to https://localhost:7072/bank will show generated weather forecast JSON. However, the tutorial has already renamed the controller to BankController and changed the Login endpoint to return "true", so that expected result is no longer accurate. Please update the verification text so it matches the actual endpoint behavior.

@qiutongMS
Copy link
Copy Markdown
Owner Author

Review Result: APPROVED

Summary

All 15 changes are narrowly scoped, mechanically correct fixes to compile-breaking syntax errors and malformed XAML/XML markup in code samples. Each fix is self-evident from the diff and produces syntactically valid, compilable code that aligns with surrounding prose.

Verified fixes

  • attached-layouts.md: <Page.Resources> -> </Page.Resources> closes the resource dictionary correctly.
  • copy-and-paste.md: adds missing ; after a lambda assigned to an event handler.
  • handle-uri-activation.md: adds missing statement-terminating ;.
  • launch-the-default-app-for-a-file.md: corrects malformed C++ template task<StorageFile^getFileOperation(...) -> task<StorageFile^> getFileOperation(...).
  • share-certificates.md: adds required return false; so ValidateCertificate (returning bool) compiles on all paths.
  • smart-cards.md: removes a stray } so the RequestPinResetAsync block balances.
  • windows-hello-auth-service.md: fixes broken lambda token f = > f -> f => f.
  • combo-box.md: collection initializer no longer calls fonts.Add(...) inside its own initializer; byte.TryParse -> double.TryParse (matches out double newValue); adds ; after object initializer.
  • flyouts.md: replaces stray { with } to close the method body.
  • radio-button.md: MainPage1() -> MainPage() so the ctor matches the class name.
  • text-block.md: <StackPanel/> -> </StackPanel> closes the root element correctly.
  • in-app-acrylic.md: grid.Fill = myBrush -> grid.Background = myBrush (Grid exposes Background, not Fill).
  • click-to-do.md: replaces invalid C++-style Windows.Foundation.Uri(L"...") with System.Uri("...") in the C# tab and adds missing ;.
  • copilot-key-state.md: corrects malformed URI :?//state=Up -> ://?state=Up and tightens </ uap3:AppExtension> -> </uap3:AppExtension>.
  • applifecycle-instancing.md: C++/WinRT property accessors require () (Kind, Key, IsCurrent).

Page Health Assessment

File Overall Quality Notes
hub/apps/design/layout/attached-layouts.md Good Snippet now well-formed XAML.
hub/apps/develop/communication/copy-and-paste.md Good Statement terminator restored.
hub/apps/develop/launch/handle-uri-activation.md Good Compiles cleanly.
hub/apps/develop/launch/launch-the-default-app-for-a-file.md Good C++ template syntax repaired.
hub/apps/develop/security/share-certificates.md Good Method now returns on all paths; matches surrounding prose.
hub/apps/develop/security/smart-cards.md Good Braces balance; surrounding tutorial steps unchanged.
hub/apps/develop/security/windows-hello-auth-service.md Good Lambda parses correctly.
hub/apps/develop/ui/controls/combo-box.md Good Collection initializer, parse type, and trailing ; consistent with prose.
hub/apps/develop/ui/controls/dialogs-and-flyouts/flyouts.md Good Method body closes properly.
hub/apps/develop/ui/controls/radio-button.md Good Constructor name now matches class.
hub/apps/develop/ui/controls/text-block.md Good Root element closure restored.
hub/apps/develop/ui/in-app-acrylic.md Good Property assignment matches the Grid API.
hub/apps/develop/windows-integration/click-to-do.md Good C# sample no longer contains C++ syntax.
hub/apps/develop/windows-integration/copilot-key-state.md Good URI scheme and closing tag are well-formed.
hub/apps/windows-app-sdk/applifecycle/applifecycle-instancing.md Good C++/WinRT accessor calls are consistent across all three snippets.

…t, enum typo

- composition-effects.md: add missing semicolon after object initializer
- focus-session.md: add missing closing > in #include directive
- store-and-retrieve-app-data.md: CreateCollisionOption → CreationCollisionOption

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@qiutongMS qiutongMS force-pushed the fix/develop/compile-breaking-syntax-and-malformed-markup branch from 527d642 to 3317027 Compare May 12, 2026 03:06
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.

1 participant