I have following problem using MVVM Light with universal app in wp8.1. In my ViewModel in constructor I create a simple RelayCommand with lambda instead of reference to method. The problem is, that sometimes when I navigate to Desktop on phone and then back to app -- the Weak reference is gone. I do understand the reason for using weak references, but I don't understand why does it removes when not unloading View and ViewModel. The same happens when returning to the page through Frame.GoBack. Even without page caching (the new instance created then) the reference suddenly sets to collected.
GoHomeCommand = new RelayCommand(() =>
{
navigationService.NavigateTo("ScheduleChoicePage");
});
<AppBarButton x:Uid="HomePage" Command="{Binding GoHomeCommand}"/>
It seems though, that when using reference to method, not lambda -- there's no problem.