Пример #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     WiredModel = NavigationServices.CurrentViewModel as WiredViewModel;
     if (e.NavigationMode == NavigationMode.New && NavigationContext.QueryString.ContainsKey("id"))
     {
         string id = NavigationContext.QueryString["id"];
         if (!String.IsNullOrEmpty(id))
         {
             _isDeepLink = true;
             WiredModel = new WiredViewModel();
             NavigationServices.CurrentViewModel = WiredModel;
             WiredModel.LoadItem(id);
         }
     }
     if (WiredModel != null)
     {
         WiredModel.ViewType = ViewTypes.Detail;
     }
     DataContext = WiredModel;
     base.OnNavigatedTo(e);
 }
Пример #2
0
 public WiredPage()
 {
     InitializeComponent();
     WiredModel = new WiredViewModel();
 }