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