Skip to content

fix: Generate properties and register names inside resource dictionaries - #7108

Closed
Youssef1313 wants to merge 10 commits into
unoplatform:masterfrom
Youssef1313:issues/4032
Closed

Youssef1313 wants to merge 10 commits into
unoplatform:masterfrom
Youssef1313:issues/4032

Conversation

@Youssef1313

@Youssef1313 Youssef1313 commented Sep 16, 2021 •

Copy link
Copy Markdown
Member

GitHub Issue (If applicable): closes #4032 (draft for now as I don't think the fix is simple as this - waiting for CI to see if it catches anything that broke)

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@Youssef1313
Youssef1313 requested a review from a team September 16, 2021 14:26
@gitpod-io

gitpod-io Bot commented Sep 16, 2021

Copy link
Copy Markdown

@Youssef1313
Youssef1313 marked this pull request as ready for review September 18, 2021 20:12
@Youssef1313

Copy link
Copy Markdown
Member Author

@MartinZikmund Can you rerun the failing check please? (I don't have access to do that myself)

@jeromelaban jeromelaban left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution!

Can you also add a check that validates that FindName() also works there (Since it's now added to the name scope) ?

mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Page.Resources>

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.

In addition to the namescope test, I think you should add a more direct test that runs on all platforms that checks that the Given_NameScope_When_Inside_ResourceDictionary.MyBrush field exists and has the correct value. (You can use x:FieldModifier="public" to make it visible.)

</ItemGroup>

<ItemGroup>
<None Remove="Tests\Windows_UI_Xaml\Given_NameScope_When_Inside_ResourceDictionary.xaml" />

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.

revert the changes to this file

@jeromelaban

Copy link
Copy Markdown
Member

Nice work! Can you also try adding an x:Name in a top level ResourceDictionary? I don't think we're validating this. (it should not break, if it does not in WinUI)

@Youssef1313

Copy link
Copy Markdown
Member Author

Nice work! Can you also try adding an x:Name in a top level ResourceDictionary? I don't think we're validating this. (it should not break, if it does not in WinUI)

I recall this scenario isn't working and I wasn't able to get it correctly. This PR can be considered as a "partial" fix in this area.

@davidjohnoliver

Copy link
Copy Markdown
Contributor

Nice work! Can you also try adding an x:Name in a top level ResourceDictionary? I don't think we're validating this. (it should not break, if it does not in WinUI)

I recall this scenario isn't working and I wasn't able to get it correctly. This PR can be considered as a "partial" fix in this area.

I think @jeromelaban 's point may not be about lighting up new functionality so much as ensuring we don't introduce a regression. Ie if x:Name in top-level dictionary was previously compiling at least (even if not behaving exactly like Windows), make sure it still compiles.

@jeromelaban
jeromelaban marked this pull request as draft January 7, 2022 14:17
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

@github-actions github-actions Bot added the stale This item has been marked as stale and will be closed if there is no activity. label Jan 29, 2025
@github-actions

github-actions Bot commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions Bot closed this Feb 9, 2025
@MartinZikmund MartinZikmund removed the stale This item has been marked as stale and will be closed if there is no activity. label Jun 17, 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.

Named resource entries of top-level XAML element aren't generated

4 participants