Skip to content

chore: minor fixes - #23100

Merged
Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20260420/elementstud-xamlscope
Apr 30, 2026
Merged

Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20260420/elementstud-xamlscope

Conversation

@Xiaoy312

@Xiaoy312 Xiaoy312 commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

re: #23088 re: https://github.com/unoplatform/kahua-private/issues/403

Note: PR #23089 was merged prematurely and was missing these minor fixes.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 21, 2026 17:54
@Xiaoy312 Xiaoy312 changed the title fix: restore XamlScope in ElementStub.Materialize for StaticResource resolution chore: minor fixes Apr 21, 2026
@Xiaoy312
Xiaoy312 requested a review from MartinZikmund April 21, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes {StaticResource} resolution for lazily-materialized x:Load="False" subtrees by preserving/restoring the XAML resource scope during ElementStub.Materialize(), and adds a runtime regression test to ensure no ResourceBinding fallback is created when static resolution succeeds.

Changes:

  • Make ElementStub store a captured XamlScope (parse-time scope) and initialize it in the parameterless ctor.
  • Ensure ElementStub.MaterializeInner() executes with the captured scope pushed (mirroring FrameworkTemplate behavior).
  • Add/update a runtime test to validate static resolution for x:Load=false content without creating ResourceBinding.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Uno.UI/UI/Xaml/ElementStub.cs Captures/initializes XAML scope for deferred materialization to restore correct {StaticResource} ancestor lookup chain.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_xLoad.cs Adds/adjusts regression test asserting no ResourceBinding is created when static resolution succeeds for x:Load=false.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Uno.UI/UI/Xaml/ElementStub.cs Resolved
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260420/elementstud-xamlscope branch from 467b83d to 0f7b814 Compare April 21, 2026 18:47
@Xiaoy312 Xiaoy312 added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label Apr 21, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 14:06
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260420/elementstud-xamlscope branch from 0f7b814 to 3d24bbf Compare April 22, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Uno.UI/UI/Xaml/ElementStub.cs Resolved
Comment thread src/Uno.UI/UI/Xaml/ElementStub.cs Resolved
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260420/elementstud-xamlscope branch from 3d24bbf to 2be6e91 Compare April 22, 2026 15:17
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 208643 has failed on Uno.UI - CI.

@Xiaoy312

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@Xiaoy312
Xiaoy312 merged commit 9070d25 into master Apr 30, 2026
62 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20260420/elementstud-xamlscope branch April 30, 2026 21:23
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 8, 2026
@unoplatform unoplatform unlocked this conversation Jun 1, 2026
@agneszitte

Copy link
Copy Markdown
Member

@Mergifyio backport release/stable/6.6

@mergify

mergify Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

backport release/stable/6.6

✅ Backports have been created

Details

agneszitte added a commit that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants