使用带有 Xamarin 表单的 Rg 插件弹出窗口 [英] Using Rg Plugins Popup with Xamarin Forms
问题描述
我是 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.Forms:iOS 和 Android.
This is for Xamarin.Forms: iOS and Android.
推荐答案
简单步骤:
- 在所有项目中安装插件
- 将弹出窗口添加到您的xml
- 使用他们在文档中提供的方法来显示/隐藏弹出窗口:
- Task PushAsync(PopupPage page, bool animate = true)
- 任务 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 插件弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!