Using Rg Plugins Popup with Xamarin Forms

∥☆過路亽.° 提交于 2020-01-22 21:30:52

问题


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:

  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



来源:https://stackoverflow.com/questions/45173876/using-rg-plugins-popup-with-xamarin-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!