Merge pull request #2875 from ueman/develop
Correct behviour for ViewModel Lifecycle for UWP
This commit is contained in:
Коммит
77586aa741
|
@ -39,7 +39,7 @@ namespace MvvmCross.Platforms.Uap.Views
|
||||||
|
|
||||||
private void MvxWindowsPage_Unloaded(object sender, RoutedEventArgs e)
|
private void MvxWindowsPage_Unloaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
ViewModel?.ViewDisappeared();
|
ViewModel?.ViewDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
|
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
|
||||||
|
@ -104,6 +104,7 @@ namespace MvvmCross.Platforms.Uap.Views
|
||||||
|
|
||||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
|
ViewModel?.ViewDisappeared();
|
||||||
base.OnNavigatedFrom(e);
|
base.OnNavigatedFrom(e);
|
||||||
var bundle = this.CreateSaveStateBundle();
|
var bundle = this.CreateSaveStateBundle();
|
||||||
SaveStateBundle(e, bundle);
|
SaveStateBundle(e, bundle);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче