Using Rg Plugins Popup with Xamarin Forms

2020-07-11 07:07发布

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条回答
太酷不给撩
2楼-- · 2020-07-11 07:11

In simple steps:

  1. Install the plugin in all the projects
  2. Add the PopUp in your Xaml
  3. 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

查看更多
登录 后发表回答