I have a problem...I have MvxGridView with Menu items and with ItemClick ShowMenuCommand
Like this:
private ICommand _showMenuCommand;
public ICommand ShowMenuCommand
{
get
{
_showMenuCommand = _showMenuCommand ?? new MvxCommand<Menu>(DoShowMenuCommand);
return _showMenuCommand;
}
}
private void DoShowMenuCommand(Menu menu)
{
ShowViewModel<MenuCardViewModel>(menu);
}
Menu contains some properties like header, name, image, etc.. but contains also List menuItems. When I debug and breakpoint in DoShowMenuCommand Menu has List of menuItems but when I debug and breakpoint in MenuCardViewModel in method Init:
public void Init(Menu menu)
{
// HERE..
}
So here Menu has everything but MenuItems list is null. I dont know why... some tips why everything is here but list is null?
MvvmCross serialises complex DTO's into JSON. I'm not sure how you have implemented this but you could try it this way and see if that helps:
So the second generic is the model that you want to pass. The next step is to add the menu generic to the "MenuCardViewModel"
This will require to implement the init method:
If this doesn't work i would suggest diving into why your list is not serializable/deserializable.