question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Popup doesn't work with hot reload

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Popup xaml changes aren’t reflected with hot reload. I’m not sure if this was part of the original intended functionality, but it can be quite tedious to iterate on Popup design changes.

Expected Behavior

Popup xaml changes should ideally be reflected during runtime, just like other Views in .NET MAUI.

Steps To Reproduce

  1. Open and run the solution in the project repository
  2. Click the button to show a popup
  3. Make changes in the popup’s xaml during runtime
  4. Observe that your changes have not been reflected

PopupHotReloadNotWorking

Link to public reproduction project repository

https://github.com/mavispuford/PopupHotReloadNotWorking

Environment

- .NET MAUI CommunityToolkit: 1.2.0
- OS:
Edition	Windows 10 Enterprise
Version	20H2
OS build	19042.1889
Experience	Windows Feature Experience Pack 120.2212.4180.0
- .NET MAUI: 6.0.486

Anything else?

I’ve also reproduced this bug in Android. I haven’t tested platforms outside of Windows/Android.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
drasticactionscommented, Sep 9, 2022

@mavispuford IHotReloadabieView has nothing to do with XAML Hot Reload, it has to do with Comet. Implementing it won’t do anything for XAML Hot Reload.

@pictos For XAML Hot Reload to work, you need to implement IVisualTreeElement, https://github.com/dotnet/maui/blob/main/src/Core/src/Core/IVisualTreeElement.cs

Most base MAUI controls (Apart from ListView) implement this out of the box. XAML Hot Reload checks if the control implements this and uses it to then go through the children. If your control doesn’t implement this, it will not show up in the Live Visual Tree, and will then not be tracked at all for XAML Hot Reload.

2reactions
drasticactionscommented, Sep 10, 2022

Also, I would leave an issue in the MAUI repo about docs for this, since none of that is obvious unless you’re me, lol.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Hot Reload on Visual Studio 2022
I was blaming VS for un-functional Hot Reload, but in my case it was caused by trying to Debug ( F5 ) and...
Read more >
Popup does not work after page change when on AppBar
It stops working when either there is a hot-reload on dev mode, or when you change the page. You can see the button...
Read more >
Hot-reload doesn't work and there are some errors in ...
I had to: turn off hot reload in the lower-right popup menu; open the project in visual studio; quit the unreal editor; rebuild...
Read more >
Troubleshooting XAML Hot Reload - Visual Studio
This troubleshooting guide includes detailed instructions that should resolve most issues that prevent XAML Hot Reload from working ...
Read more >
Hot reload buggy sometimes? - Blueprint
Hi, I have been working with C++/Blueprints project and recompile my source files a lot. And I have noticed that sometimes things not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found