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