MvvmCross Xamarin.Forms Modal Dialogs


I’m just trying to make my first app with MvvmCross but I already encounter a problem for my app and can’t find anything on the web for that. I want to open a specific page as a modal dialog on supported devices (eg. iPads). For my non MvvmCross applications I do this with Rg.Plugin.Popup but I do not want it this way this time. I found a few solutions on how it can be done with native and MvvmCross but nothing about how it is done with Xamarin.Forms in combination to MvvmCross. Did I need to implement a own presenter and filter on the type of my page (because this page should always be modal on supported devices)? And if I do so, is there any example for this?

Source: Xamarin.ios Questions

Categorised as Uncategorised Tagged , , , ,


Using MvvmCross 5.2.0, the following worked for me (on iOS at least; haven’t tested on Android):

var bundle = new MvxBundle(new Dictionary<string, string>{ { MvxFormsPagePresenter.ModalPresentationParameter, "true" } });
await _navService.Navigate<MyViewModel>(bundle);

This uses the stock-standard MvxFormsPagePresenter, so you don’t have to create your own presenter.

Jacquelyn Lowe

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us