protected async override void OnNavigatedTo(NavigationEventArgs e) { _navigationHelper.OnNavigatedTo(e); await DestaquesModel.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 DestaquesModel.LoadItemsAsync(); DestaquesModel.SelectItem(e.Parameter); if (DestaquesModel != null) { DestaquesModel.ViewType = ViewTypes.Detail; } DataContext = this; }