-
Notifications
You must be signed in to change notification settings - Fork 464
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
The new popup implementation released with version 12.0.0 doesn't work in a Windows Shell app and secondary windows. If I open a page in a new window and then try to open a popup, the app crashes.
The reason is that access to the current shell instance is done with Shell.Current in the PopupPage constructor. However, since the shell window is not active because the secondary window is active, this leads to the following exception:
throw new InvalidOperationException($"Unable to determine the current Shell instance you want to use. Please access Shell via the Windows property on {Application.Current.GetType()}.");
Expected Behavior
The popup will appear in the secondary window.
Steps To Reproduce
The new popup implementation released with version 12.0.0 doesn't work in a Windows Shell app and secondary windows. If I open a page in a new window and then try to open a popup, the app crashes.
Link to public reproduction project repository
Not required as it is very easy to adjust
Environment
- .NET MAUI CommunityToolkit: 12.0.0
- OS: Windows 11
- .NET MAUI: 9.0.70Anything else?
No response