Exemplo n.º 1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     BotaModel = NavigationServices.CurrentViewModel as BotaViewModel;
     if (e.NavigationMode == NavigationMode.New && NavigationContext.QueryString.ContainsKey("id"))
     {
         string id = NavigationContext.QueryString["id"];
         if (!String.IsNullOrEmpty(id))
         {
             _isDeepLink = true;
             BotaModel   = new BotaViewModel();
             NavigationServices.CurrentViewModel = BotaModel;
             BotaModel.LoadItem(id);
         }
     }
     if (BotaModel != null)
     {
         BotaModel.ViewType = ViewTypes.Detail;
     }
     DataContext = BotaModel;
     base.OnNavigatedTo(e);
 }
Exemplo n.º 2
0
 public BotaPage()
 {
     InitializeComponent();
     BotaModel    = new BotaViewModel();
     this.Loaded += Bota_Loaded;
 }