コード例 #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     AppleInsiderModel = NavigationServices.CurrentViewModel as AppleInsiderViewModel;
     if (e.NavigationMode == NavigationMode.New && NavigationContext.QueryString.ContainsKey("id"))
     {
         string id = NavigationContext.QueryString["id"];
         if (!String.IsNullOrEmpty(id))
         {
             _isDeepLink = true;
             AppleInsiderModel = new AppleInsiderViewModel();
             NavigationServices.CurrentViewModel = AppleInsiderModel;
             AppleInsiderModel.LoadItem(id);
         }
     }
     if (AppleInsiderModel != null)
     {
         AppleInsiderModel.ViewType = ViewTypes.Detail;
     }
     DataContext = AppleInsiderModel;
     base.OnNavigatedTo(e);
 }