protected override void OnNavigatedTo(NavigationEventArgs e) { Section6Model = NavigationServices.CurrentViewModel as Section6ViewModel; if (e.NavigationMode == NavigationMode.New && NavigationContext.QueryString.ContainsKey("id")) { string id = NavigationContext.QueryString["id"]; if (!String.IsNullOrEmpty(id)) { _isDeepLink = true; Section6Model = new Section6ViewModel(); NavigationServices.CurrentViewModel = Section6Model; Section6Model.LoadItem(id); } } if (Section6Model != null) { Section6Model.ViewType = ViewTypes.Detail; } DataContext = Section6Model; base.OnNavigatedTo(e); }
public Section6Page() { InitializeComponent(); Section6Model = new Section6ViewModel(); }