public GeolocationPage() { InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Required; _navigationHelper = new NavigationHelper(this); _navigationHelper.LoadState += NavigationHelper_LoadState; _navigationHelper.SaveState += NavigationHelper_SaveState; }
public MainPage() { InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Required; navigationHelper = new NavigationHelper(this); navigationHelper.LoadState += NavigationHelper_LoadState; navigationHelper.SaveState += NavigationHelper_SaveState; var viewmodel = DataContext as MainViewModel; if (viewmodel != null) viewmodel.CollectionLoaded += OnCollectionLoaded; }