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