protected override void OnNavigatedTo(NavigationEventArgs e) { if (_isNewPageInstance) { if (State.Count > 0) { _viewModel = (PostViewModel)State["PostViewModel"]; MainPage.api = (FPAPI)State["API"]; } else { _viewModel = new PostViewModel(); string threadidstr = ""; //May not be needed if you'll only ever go to page 2 from page 1 to download... if (NavigationContext.QueryString.TryGetValue("threadid", out threadidstr)) { int threadid = -1; if (Int32.TryParse(threadidstr, out threadid)) { _threadId = threadid; _viewModel.Load(threadid, 1); } } } DataContext = _viewModel; } SystemTray.BackgroundColor = _viewModel.BgColor; SystemTray.ForegroundColor = _viewModel.FgColor; BuildLocalizedApplicationBar(); }