Announcing FreshMvvm 2.0

Today we’ve published up to nuget FreshMvvm 2.0 with some very anticipated new features.

IOC Container Lifetime Registration Options

We now support a fluent API for setting the object lifetime of object inside the IOC Container.

As you can see below the IFreshIOC interface methods return the IRegisterOptions interface.

The interface that’s returned from the register methods is IRegisterOptions.

Switching out NavigationStacks on the Xamarin.Forms MainPage

There’s some cases in Xamarin.Forms you might want to run multiple navigation stacks. A good example of this is when you have a navigation stack for the authentication and a stack for the primary area of your application.

To begin with we can setup some names for our navigation containers.

Then we can create our two navigation containers and assign to the MainPage.

Once we’ve set this up we can now switch out our navigation containers.

New public methods

CurrentNavigationServiceName and PreviousNavigationServiceName are both public methods, so you can access them if you need to.

Some features (recently released)

Multiple Navigation Services
Custom IOC Containers
Pushing different views
Clean up after page is Popped


As always this is available on nuget now!

If you have any questions please ask on and send me a email.

You can also find some more docs on the github repo.


5 Responses

  1. I’m unsure what happens when you create MainTabbedPage and pass it the containerName, how is the navigation container for ‘main container’ created?

    1. var myPitchListViewContainer = new MainTabbedPage(NavigationContainerNames.MainContainer);

      This line does all the setting up for the MainContainer as a tabbed page, it put itself into the container so you can call it with the name NavigationContainerNames.MainContainer.

  2. Hi Michael,

    In the above code the class MainTabbedPage, is it from freshmvvm2.0 or user defined class to set up tab pages ?

    1. MainTabbedPage is a page that’s inherited from FreshTabbedContainer, we do this so that we can override functionality.

Leave a Reply