简体   繁体   中英

PushPopupPageAsync not found in Xamarin Forms Prism

Not found PushPopupPageAsync

_navigationService.PushPopupPageAsync( "MyPopupPage" );

I am using Rg.Plugin.Popup along withg Prism but PushPopupPageAsync not available on INavigationService

how to solve it?

Are you sure that you should be calling PushPopupPageAsync ? Rg.Plugin.Popup extends the Navigation service with PushPopupAsync - note there is no Page in the name.

To be able to use PushPopupAsync you also need to have:

using Rg.Plugins.Popup.Extensions;

in the source file where you want to call PushPopupAsync

Its easier to use the Prism.Plugin.Popups made by the Prism maintainer, then you can just use the standard NavigateAsync method:

_navigationService.NavigateAsync("MyPopupPage")

With this, te page is pushed as a popup with Rg.Plugin.Popup. (of course you have to target a PopupPage to make this works)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM