问题
I am very new to Xamarin Forms development and I need a popup dialog. I found exactly what I am looking for in https://github.com/rotorgames/Rg.Plugins.Popup, but I cannot for the life of me figure out how to use it. Could someone point me to a working example or provide some direction on use? The README.md on the site is not helping me much.
I want the the popup dialog to appear when a info button is clicked in the top navigation bar. All the popup needs is 1-2 buttons (and labels) for setting user settings.
This is for Xamarin.Forms: iOS and Android.
回答1:
In simple steps:
- Install the plugin in all the projects
- Add the PopUp in your Xaml
- Use the methods they provide on the documentacion for Show/Hide the PopUp:
- Task PushAsync(PopupPage page, bool animate = true)
- Task PopAllAsync(bool animate = true)
They also provide a demo, check it: https://github.com/rotorgames/Rg.Plugins.Popup/tree/master/src/Demo
来源:https://stackoverflow.com/questions/45173876/using-rg-plugins-popup-with-xamarin-forms