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