Skip to content

Conversation

@devanathan-vaithiyanathan
Copy link
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Oct 7, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Fix Details

This PR is an extension of #31515 which included a fix for the IsPresented initial loading issue.
However, the changes in #31515 caused the EnsureFlyoutBehaviorChanges test to fail.
This PR provides an additional fix to resolve that test failure and ensure consistent behavior of the IsPresented property during navigation and layout mode changes.

Root Cause

When navigating to a new page and changing the FlyoutLayoutBehavior, the Loaded event fires again after returning (Pop) to the original page. Inside the OnLoaded method, the following line re-applied the IsPresented value

Description of Change

To prevent the repeated application of the IsPresented value, the Loaded event is now unwired within the method itself after execution.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Oct 7, 2025
@devanathan-vaithiyanathan devanathan-vaithiyanathan marked this pull request as ready for review October 7, 2025 12:50
Copilot AI review requested due to automatic review settings October 7, 2025 12:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a test failure in the FlyoutPage test case on Windows by preventing the OnLoaded method from being called multiple times. The changes ensure that the IsPresented property is only applied once during the initial load, avoiding unwanted re-application when navigating between pages or changing layout behavior.

Key changes:

  • Adds event unwiring logic to prevent repeated execution of OnLoaded
  • Ensures consistent behavior of IsPresented property during navigation and layout changes

@rmarinho
Copy link
Member

rmarinho commented Oct 7, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit ae3af22 into dotnet:main Oct 7, 2025
124 of 129 checks passed
@PureWeen
Copy link
Member

/backport to release/9.0.1xx-sr12

@github-actions
Copy link
Contributor

Started backporting to release/9.0.1xx-sr12: https://github.com/dotnet/maui/actions/runs/18535378993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-flyout Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants