Skip to content

Commit 906936e

Browse files
WasPreviousPageACommunityToolkitPopupPage() Extension Method Documentation (#601)
* Update email-validation-behavior.md * Add .NET Hot Reload Docs * Update Popup.md --------- Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Gerald Versluis <gerald@verslu.is> Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
1 parent 27e0303 commit 906936e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/maui/views/Popup.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,20 @@ It is important to note that a `Popup` will be displayed inside `ContentPage` wh
184184
| Show popup | Current `Page` will receive `OnDisappearing` and `OnNavigatingFrom` |
185185
| Close popup | Previous `Page` will receive `OnAppearing` and `OnNavigatedTo` |
186186

187+
To determine if `OnNavigatedTo(NavigatedToEventArgs)` was called by dismissing `Popup`, you can use the `WasPreviousPageAToolkitPopup()` extension method:
188+
189+
```cs
190+
protected override async void OnNavigatedTo(NavigatedToEventArgs args)
191+
{
192+
base.OnNavigatedTo(args);
193+
194+
if (args.WasPreviousPageACommunityToolkitPopupPage())
195+
{
196+
// If true, `OnNavigatedTo` was called by dismissing a Popup
197+
}
198+
}
199+
```
200+
187201
## PopupOptions
188202

189203
The `PageOverlayColor`, `Shape`, `Shadow` can all be customized for Popup. See [PopupOptions](./popup/popup-options.md) for more details.

0 commit comments

Comments
 (0)