Skip to content

Commit 02e8726

Browse files
Update to document for extension IsDestinationPageACommunityToolkitPo… (#605)
Update to document for extension IsDestinationPageACommunityToolkitPopupPage
1 parent 9f76fad commit 02e8726

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/maui/views/Popup.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,19 @@ protected override async void OnNavigatedTo(NavigatedToEventArgs args)
198198
}
199199
```
200200

201+
To determine if `OnNavigatedFrom(NavigatedFromEventArgs)` was called by opening a `Popup`, you can use the `IsDestinationPageACommunityToolkitPopupPage()` extension method:
202+
203+
```cs
204+
protected override async void OnNavigatedFrom(NavigatedFromEventArgs args)
205+
{
206+
base.OnNavigatedFrom(args);
207+
if (args.IsDestinationPageACommunityToolkitPopupPage())
208+
{
209+
// If true, `OnNavigatedFrom` was called by starting a Popup
210+
}
211+
}
212+
```
213+
201214
## PopupOptions
202215

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

0 commit comments

Comments
 (0)