在Xamarin表单中使用Rg插件弹出窗口 [英] Using Rg Plugins Popup with Xamarin Forms

查看:232
本文介绍了在Xamarin表单中使用Rg插件弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对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.

推荐答案

简单的步骤:

  1. 在所有项目中安装插件
  2. 将弹出窗口添加到您的 Xaml
  3. 使用它们在文档上提供的用于显示/隐藏弹出窗口的方法:
    • 任务PushAsync(PopupPage页面,布尔动画= true)
    • 任务PopAllAsync(bool animate = true)
  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)

他们还提供了一个演示,请检查它: 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆