Beispiel #1
0
 private void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
 {
     if (ElheddafModel != null)
     {
         ElheddafModel.GetShareContent(args.Request);
     }
 }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await ElheddafModel.LoadItemsAsync();

            DataContext = this;
        }
Beispiel #3
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);
 }
Beispiel #4
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

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

                ElheddafModel.SelectItem(e.Parameter);

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