protected async override void OnNavigatedTo(NavigationEventArgs e) { _navigationHelper.OnNavigatedTo(e); await ViSuAlSModel.LoadItemsAsync(); DataContext = this; }
/// <summary> /// Load ViewModel items asynchronous /// </summary> public async Task LoadDataAsync(bool forceRefresh = false) { var loadTasks = new Task[] { MuSiCModel.LoadItemsAsync(forceRefresh), MUSICALINSTRUMENTSModel.LoadItemsAsync(forceRefresh), TYPESOFINSTRUMENTSModel.LoadItemsAsync(forceRefresh), HOWTOPLAYModel.LoadItemsAsync(forceRefresh), MUsIcNEWSModel.LoadItemsAsync(forceRefresh), ViSuAlSModel.LoadItemsAsync(forceRefresh), }; await Task.WhenAll(loadTasks); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { _navigationHelper.OnNavigatedTo(e); await ViSuAlSModel.LoadItemsAsync(); ViSuAlSModel.SelectItem(e.Parameter); if (ViSuAlSModel != null) { ViSuAlSModel.ViewType = ViewTypes.Detail; } }