Refines MAUI Dialog Layout and Active State Management#3390
Merged
brianlagunas merged 4 commits intomasterfrom Mar 28, 2026
Merged
Refines MAUI Dialog Layout and Active State Management#3390brianlagunas merged 4 commits intomasterfrom
brianlagunas merged 4 commits intomasterfrom
Conversation
Ensures that PageNavigationSource and IsActive state updates are deferred until the dialog has been pushed by using ContinueWith on the asynchronous ConfigureLayout call. This prevents state updates from executing before the modal is actually displayed.
Replaces the root AbsoluteLayout in DialogContainerPage with a Grid. This ensures the background mask fills the screen naturally without needing proportional sizing or explicit WidthRequest/HeightRequest bindings, which were causing tap gestures to fail on some MAUI platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This change set significantly improves the reliability and behavior of MAUI dialogs and window activation states.
The
DialogContainerPage's content layout has been refactored to address issues with the dialog mask layout and tap gesture reliability across MAUI platforms. The main overlay now utilizes aGridto ensure the mask fills the page naturally without conflicting withWidthRequest/HeightRequestbindings. A nestedAbsoluteLayoutis maintained specifically for the popup content, allowing existingLayoutBoundspositioning to function as expected.A race condition in the
DialogService's navigation state andIActiveAwareupdates has been resolved. The process of settingPageNavigationService.NavigationSourceand updatingIsActiveproperties forIActiveAwareviews and view models now correctly defers until the modal dialog is actually displayed, preventing premature state changes.Additionally, the
IActiveAwarestate for the current page is now correctly updated tofalsewhen aPrismWindowis deactivated, ensuring consistent application state management.Bugs Fixed
IActiveAwareinstancesAPI Changes
None
Behavioral Changes
IsActivestate updates forIActiveAwarecomponents during dialog presentation will be more accurate and timely.IsActivestate of the current page will correctly reflect window deactivation.