コード例 #1
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await ViSuAlSModel.LoadItemsAsync();

            DataContext = this;
        }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);

            await ViSuAlSModel.LoadItemsAsync();

            ViSuAlSModel.SelectItem(e.Parameter);

            if (ViSuAlSModel != null)
            {
                ViSuAlSModel.ViewType = ViewTypes.Detail;
            }
        }