-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Sample App: OnXamlRendered does not get called. #3673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello RosarioPulella, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
I wasn't able to reproduce for AdaptiveGridView (which is parsing twice), but was able to see it for Carousel, so investigating... |
Think I see the problem, assumed I'd find a XamlRoot and made wrong assumption about what to do if I didn't. Will compare against previous behavior and update. Did also see where we update twice. We load once from the Pivot SelectionChanged and also in the SamplePage_Loaded method, but we have a comment there about not getting the event from the Pivot selection changed, so wonder if this was an OS bug which was later fixed... We could add a private value to track if we've rendered from loading the initial sample yet to only render once, but not sure if we want to mess with that now or just fix later when we work on samples in 7.1... |
Alright, testing out a fix. Tried to clean-up the notion we had of the |
… working correctly
Fixes #3673 and resolves issues with some samples not working correctly
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
In the sample app, for samples with
*.xmal.cs
files, if the page inherits fromIXamlRenderListener
OnXamlRendered
does not seem to be getting called.My investigating showed that in this line the cast fails for the pages I tested (
CarouselPage
,DockPanel
,AdaptiveGridView
)https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/205eedfc930e62dd8e21c8a8df63a9e75ba4955f/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs#L555
It was introduced in Type property is now optional for Samples #3648
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
For every sample that uses
IXamlRenderListener
andOnXamlRendered
the code inOnXamlRendered
is called when the sample is loaded.Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: