title: Passing data to fragment viewmodel mvvmcross
body: <p>so I have an activity that has a tabbed page with 2 fragments. </p>
  
  <pre><code>  public class RecipeDetailActivity : BaseFragmentActivity&lt;RecipeDetailViewModel&gt;
      {
          protected override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
  
              SetContentView(Resource.Layout.RecipeDetailView);
  
              AttachActionBar();
              SupportActionBar.SetDisplayHomeAsUpEnabled(true);
              SupportActionBar.Title = "Recipe details";
  
              var viewPager = FindViewById&lt;ViewPager&gt;(Resource.Id.main_view_pager);
  
              if (viewPager != null)
              {
                  var fragments = new List&lt;MvxViewPagerFragmentInfo&gt;();
                  fragments.Add(
                      new MvxViewPagerFragmentInfo("Ingrediente", typeof(RecipeFlavoursFragment), typeof(RecipeFlavoursViewModel)));
                  fragments.Add(
                      new MvxViewPagerFragmentInfo("Flavours", typeof(RecipeIngridientsFragment), typeof(RecipeIngridientsViewModel)));
  
                  viewPager.Adapter = new MvxFragmentPagerAdapter(this, SupportFragmentManager, fragments);
  
  
                  viewPager.Adapter = new MvxFragmentPagerAdapter(this, SupportFragmentManager, fragments);
                  var tabLayout = FindViewById&lt;TabLayout&gt;(Resource.Id.main_tablayout);
                  tabLayout.SetupWithViewPager(viewPager);
              }
          }
      }
  </code></pre>
  
  <p>I show this page using the following code.</p>
  
  <pre><code>   private void SelectRecipe(RecipeModel recipe)
     {
              var recipeJson = JsonConvert.SerializeObject(recipe);
  
              ShowViewModel&lt;RecipeDetailViewModel&gt;(new { recipe = recipeJson });
     }
  </code></pre>
  
  <p>Now what I would like is to pass some data to child view models. 
  <strong>RecipeFlavoursViewModel
  RecipeIngridientsViewModel</strong></p>
  
  <p>I've tried so far : 
  Using <strong>parameterValueObject</strong></p>
  
  <pre><code>        fragments.Add(
              new MvxViewPagerFragmentInfo("Ingrediente", typeof(RecipeFlavoursFragment), typeof(RecipeFlavoursViewModel), new { recipe = ViewModel.Recipe }));
  </code></pre>
  
  <p>Using IMvxBundle </p>
  
  <p>In <strong>RecipeDetailViewModel</strong></p>
  
  <pre><code> protected override void SaveStateToBundle(IMvxBundle bundle)
   {
              bundle.Data["Recipe"] = JsonConvert.SerializeObject(Recipe);
  
              base.SaveStateToBundle(bundle);
   }
  </code></pre>
  
  <p>In <strong>RecipeIngridientsViewModel</strong></p>
  
  <pre><code>protected override void InitFromBundle(IMvxBundle parameters)
          {
              base.InitFromBundle(parameters);
  
              if (parameters.Data.Count != 0)
              {
                  Recipe = JsonConvert.DeserializeObject&lt;RecipeModel&gt;(parameters.Data["recipe"]);
              }
          }
  </code></pre>
  
  <p>None of them have worked so far. Any ideas what am I doing wrong? Do I have to use the navigation service  from MvvmCross 5 to be able to use InitFromBundle and SaveStateToBundle.</p>
  
  <p><strong>InitFromBundle</strong> it's called everytime my fragments is displayed, but <strong>SaveStateToBundle</strong> from <strong>RecipeDetailViewModel</strong> never gets called.</p>