Extend NavigatedFromEventArgs from OnNavigatedFrom to allow determine if DestinationPage is Popup #2927
Replies: 2 comments 5 replies
-
|
Maybe @bijington will read this and consider your request. CoPilot is here to help :) Patch overview File: src/CommunityToolkit.Maui/Extensions/NavigationEventArgsExtensions.cs File: tests/CommunityToolkit.Maui.UnitTests/Extensions/NavigationEventArgsExtensionsTests.cs
Detecting popups when returning from a pageWhen handling OnNavigatedFrom, you can check whether the destination page is a CommunityToolkit popup using the provided extension: Title: Body: Changes:
Implementation notes:
If you prefer a unified git diff (unified patch) instead of separate file contents, tell me and I will provide it next. |
Beta Was this translation helpful? Give feedback.
-
|
to be fair... i've actually already developed the solution in a new branch. But following the guidelines haven't tried raising a pr for it or anything. But i wanted to have a play and see if i could do something (even if it was just following @bijington previous work) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Within the new version of community toolkit you expanded the NavigatedToEventArgs in order for us to check if the previous page was a popup. This works great, so thanks. But i think it would be useful to also allow the DestinationPage within the NavigatedFromEventArgs to check if its a popup page so within the method we could do something like this
if (args.IsDestinationPageACommunityToolkitPopupPage()) { // Handle any specific logic needed when returning from a popup }Beta Was this translation helpful? Give feedback.
All reactions