예제 #1
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await FavoritosModel.LoadItemsAsync();

            DataContext = this;
        }
예제 #2
0
 /// <summary>
 /// Load ViewModel items asynchronous
 /// </summary>
 public async Task LoadDataAsync(bool forceRefresh = false)
 {
     var loadTasks = new Task[]
     {
         RecentesModel.LoadItemsAsync(forceRefresh),
         DestaquesModel.LoadItemsAsync(forceRefresh),
         MapasModel.LoadItemsAsync(forceRefresh),
         FavoritosModel.LoadItemsAsync(forceRefresh),
     };
     await Task.WhenAll(loadTasks);
 }
예제 #3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            await FavoritosModel.LoadItemsAsync();

            FavoritosModel.SelectItem(e.Parameter);

            if (FavoritosModel != null)
            {
                FavoritosModel.ViewType = ViewTypes.Detail;
            }
            DataContext = this;
        }