Change to display Popup on Active Window page on Windows#1617
Change to display Popup on Active Window page on Windows#1617TheCodeTraveler merged 9 commits intoCommunityToolkit:mainfrom
Conversation
|
In cases where a popup is displayed by setting a timer, it will not be displayed intentionally. . . |
|
It would be best if there was a way to determine which page is calling the Popup. . . |
|
Perhaps to solve this problem we need some variation of Popup's ShowPopup, ShowPopupAsync methods that pass an instance of the page we want to display. |
|
|
||
| ValidateBindingContext<TViewModel>(popup, out _); | ||
|
|
||
| #if WINDOWS |
There was a problem hiding this comment.
can you extract it to the single method and call only once? also could you please remove all null-forgiving operators. they are forbidden in this repo
There was a problem hiding this comment.
@VladislavAntonyuk , Thank you for your review.
I cut it out to a single method and removed null-forgiving.
|
I am just wondering if we could opt for registering the |
This PR resolves the issue where popups are not displayed on the active window page on Windows.
Description of Change
To get the active windows in Windows, look for each window whose IsActivated property is true in Application.Current.Windows.
Call the ShowPopup and ShowPopupAsync methods on the active window page.
Below are the changes.
[src\CommunityToolkit.Maui\PopupService.cs]
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information
Below are the verification results.
2023-12-21.180127.mp4
You can see that the Popup is displayed in the active window.