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