Skip to content
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

[Bug] Setting a MAUI Window with a new page doesn't change to the new page. #1500

Closed
drasticactions opened this issue Jun 30, 2021 · 4 comments
Labels
partner/ui-tools .NET UI Tools
Milestone

Comments

@drasticactions
Copy link
Contributor

Description

A MAUI Window has a settable Page parameter. If you try to set it from within an existing page (Either by calling the top parent as I do here, or potential through dependency injection), nothing seems to happen. If you notice, the Live Visual Tree does update with the new page, and we do receive VisualTree Change events showing that something happened, but it's not reflected in the running application.

My expectation would either be that you can't replace the existing Window's page, or that if you do, it updates to the new page.

Steps to Reproduce

  1. Check out this project
  2. Build, deploy, and click "Replace Window with Second page"

Expected Behavior

The Window's contents change to reflect the new page.

Actual Behavior

Nothing happens.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

maui-new-window-error.mp4

Reproduction Link

Workaround

@drasticactions drasticactions changed the title [Bug] [Bug] Setting a MAUI Window with a new page doesn't change to the new page. Jun 30, 2021
@Redth Redth added this to the 6.0.100-preview.7 milestone Jun 30, 2021
@chabiss chabiss added the partner/ui-tools .NET UI Tools label Jun 30, 2021
@Redth
Copy link
Member

Redth commented Jun 30, 2021

@mattleibow thoughts on this? especially wrt your Window PR #1468

@mattleibow
Copy link
Member

Oh... My PR might just solve that. I'll test.

@mattleibow
Copy link
Member

Yep, I see my PR did not do that correctly because I did it wrong. But I just fixed it :) So... "Yeah of course. We just added that feature to the new preview." 🤣

@drasticactions
Copy link
Contributor Author

Trying this with 6.0.100-rc.1.1310 in main, it appears to be fixed. After pushing the page on the window, we get the proper events and the live visual tree propagates, and the page actually changes in the app.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partner/ui-tools .NET UI Tools
Projects
None yet
Development

No branches or pull requests

4 participants