I've been playing with the Exrin Xamarin Forms framework which I'm liking.
I've come to a blocker where I want to push a container as a Modal. Anyone know any tips on how to do this? I can't find any examples, or a best approach on how to push a container as Modal.
Looking at the Exrin code, might have to change BaseStack.cs
, create a NavigationModal
ResultType
, lifestyle so it doesn't affect already in memory containers, etc...?
Any other ideas?
The idea behind Exrin and its Stacks, is that a Modal wouldn't be needed. The only reason for Modals, is for a page that you can't just press back from and sits on top of the existing page.
The recommended approach here, is to create a new Stack and just navigate to that. Then go back to the previous stack once finished. It behaves the same way as a Modal, but you don't need to actually use a Modal.
Update
If you must have a Modal, while other ways to support transitions come into play, you can modify your NavigationProxy. Replace the 2 functions below.
Of course this is manually referencing a specific page in your proxy. If you wanted to clean that up, you could add some methods in your Stack to list pages that are modal, and use that list to push to modal if needed, rather than directly putting the page names inside the proxy.