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