Jesse Liberty
Jesse Liberty

Reputation: 1414

Xamarin.Forms XLabs Navigation

I'm using XLabs navigation which is terrific because it allows ViewModel to ViewModel navigation and it also allows passing of parameters to the class constructor. It is working flawlessly as I move through my program, but crashes when I try to go back to a previous page, either directly or by using GoBack().

private RelayCommand<Item> itemSelectedCommand;
public RelayCommand<Item> ItemSelectedCommand {
get {
   return itemSelectedCommand ?? (itemSelectedCommand = new    
RelayCommand<Item>    ((item) => {
NavigationService.NavigateTo<ItemDetailPageViewModel> (true, item);
       }));
   }
 } 

If I have not yet visited ItemDetailPageViewModel, this works great, but if I have been there and am returning, this crashes.

The xLabs packages I have installed are: XLabs.Core, XLabs.Forms, XLabs.IoC, XLabs.Platform, XLabs.Serialization

Any suggestions?

Thanks

jesse liberty

Upvotes: 1

Views: 165

Answers (0)

Related Questions