protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await ElwatanModel.LoadItemsAsync();

            DataContext = this;
        }
示例#2
0
 /// <summary>
 /// Load ViewModel items asynchronous
 /// </summary>
 public async Task LoadDataAsync(bool forceRefresh = false)
 {
     var loadTasks = new Task[]
     {
         ElheddafModel.LoadItemsAsync(forceRefresh),
         EchoroukModel.LoadItemsAsync(forceRefresh),
         ElwatanModel.LoadItemsAsync(forceRefresh),
         LexpressionModel.LoadItemsAsync(forceRefresh),
         LiberteModel.LoadItemsAsync(forceRefresh),
     };
     await Task.WhenAll(loadTasks);
 }
示例#3
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            if (ElwatanModel != null)
            {
                await ElwatanModel.LoadItemsAsync();

                ElwatanModel.SelectItem(e.Parameter);

                ElwatanModel.ViewType = ViewTypes.Detail;
            }
            DataContext = this;
        }