protected async override void OnNavigatedTo(NavigationEventArgs e) { _navigationHelper.OnNavigatedTo(e); await CIRCUITSModel.LoadItemsAsync(); DataContext = this; }
/// <summary> /// Load ViewModel items asynchronous /// </summary> public async Task LoadDataAsync(bool forceRefresh = false) { var loadTasks = new Task[] { ELECTRONICSModel.LoadItemsAsync(forceRefresh), CircuitsAndNetworksModel.LoadItemsAsync(forceRefresh), CIRCUITSModel.LoadItemsAsync(forceRefresh), NETWORKSModel.LoadItemsAsync(forceRefresh), EXTRAINFOModel.LoadItemsAsync(forceRefresh), AUDIOVISUALSModel.LoadItemsAsync(forceRefresh), }; await Task.WhenAll(loadTasks); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { _dataTransferManager = DataTransferManager.GetForCurrentView(); _dataTransferManager.DataRequested += OnDataRequested; _navigationHelper.OnNavigatedTo(e); await CIRCUITSModel.LoadItemsAsync(); CIRCUITSModel.SelectItem(e.Parameter); if (CIRCUITSModel != null) { CIRCUITSModel.ViewType = ViewTypes.Detail; } DataContext = this; }