MvxPopupNavigation
This library allows to use Rg.Plugin.Popup pages and navigation with MvvmCross in your Xamarin.Forms application.
-
Register CustomMvxFormsPagePresenter by overriding
CreateFormsPagePresenter
in the Android/iOS Setup class, this allows to use Rg.Plugin.Popup navigation.public class Setup : MvxFormsAndroidSetup<MvxApp, App> { protected override IMvxFormsPagePresenter CreateFormsPagePresenter(IMvxFormsViewPresenter viewPresenter) { var formsPagePresenter = new CustomMvxFormsPagePresenter(viewPresenter); Mvx.IoCProvider.RegisterSingleton<IMvxFormsPagePresenter>(formsPagePresenter); return formsPagePresenter; } }
-
Use MvxPopupPage as base for your desired popup pages (this class implements IMvxPage).
<?xml version="1.0" encoding="UTF-8" ?> <mvxPopupNavigation:MvxPopupPage x:Class="Demo.Views.SamplePopupView" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:mvxPopupNavigation="clr-namespace:MvxPopupNavigation;assembly=MvxPopupNavigation"> <ContentPage.Content /> </mvxPopupNavigation:MvxPopupPage>
-
Use the navigation attribute in the C# declaration.
[MvxPopUpPage] public partial class SamplePopupView : MvxPopupPage { public SamplePopupView() { InitializeComponent(); } }