Fixes #3673 and resolves issues with some samples not working correctly#3675
Conversation
… working correctly
|
Thanks michael-hawker for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
|
Once we validate and merge this to the main branch we can update the dev branches as well. FYI @Sergio0694 |
Rosuavio
left a comment
There was a problem hiding this comment.
Seems to have fixed things to me,
|
@Kyaa-dost want to test out a smattering of some different samples and let us know how it goes? The 'Trigger' samples under helpers use the new XAML only setup, and then anything with buttons on the bottom is using code-behind, and anything with other content around the sample is using code-behind + xamlroot. |
Kyaa-dost
left a comment
There was a problem hiding this comment.
Thanks, @michael-hawker!! Tested out lots of lots of samples and are performing as expected 🚀
|
Hello @michael-hawker! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 6 hours 42 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Fixes #3673
Forgot to check some scenarios in the original update to #3648 and broke scenarios of pages with code-behind. This PR resolves that and forward-fixes all sample types (XAML only, code-behind, code-behind + XamlRoot).
PR Type
What kind of change does this PR introduce?
What is the current behavior?
If a sample page didn't have a
XamlRootdefined in it's page it was getting obliterated in theUpdateXamlRendercall.What is the new behavior?
Clearly defined what a
SamplePagewas (to be the backing instance of a sample (if one)). Then used that to instead overwrite it's content as intended if there is noXamlRootinstead of the entire page itself.i.e. the bug was that we were replacing the entire page with the rendered XAML and therefore no longer held an instance to call
IXamlRenderListeneron. This fix now checks for that condition and only updates the inner page content vs. our entire hosted content within the Sample.PR Checklist
Please check if your PR fulfills the following requirements:
FYI @RosarioPulella, @Kyaa-dost