问题描述
我对Xamarin Forms开发非常陌生,我需要一个弹出对话框.我在 https://github.com/rotorgames/Rg.Plugins中找到了我想要的东西.弹出窗口,但是我一生无法弄清楚如何使用它.有人可以指出我的工作示例或提供使用说明吗?该网站上的README.md对我没有太大帮助.
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.
我希望在顶部导航栏中单击信息按钮时出现弹出对话框.只需弹出1-2个按钮(和标签)即可设置用户设置.
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.
这用于Xamarin.表单:iOS和Android.
This is for Xamarin.Forms: iOS and Android.
推荐答案
简单的步骤:
- 在所有项目中安装插件
- 将弹出窗口添加到您的Xaml
- 使用它们在文档上提供的用于显示/隐藏弹出窗口的方法:
- 任务PushAsync(PopupPage页面,布尔动画= true)
- 任务PopAllAsync(bool animate = true)
- Install the plugin in all the projects
- Add the PopUp in yourXaml
- 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)
他们还提供了一个演示,请检查它: https://github.com/rotorgames/Rg.Plugins.Popup /tree/master/src/Demo
They also provide a demo, check it:https://github.com/rotorgames/Rg.Plugins.Popup/tree/master/src/Demo
这篇关于在Xamarin表单中使用Rg插件弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!