protected async override void OnNavigatedTo(NavigationEventArgs e) { _navigationHelper.OnNavigatedTo(e); await FavoritosModel.LoadItemsAsync(); DataContext = this; }
/// <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); }
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; }