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

            DataContext = this;
        }
Пример #2
0
 /// <summary>
 /// Load ViewModel items asynchronous
 /// </summary>
 public async Task LoadDataAsync(bool forceRefresh = false)
 {
     var loadTasks = new Task[]
     {
         GETLOCATIONModel.LoadItemsAsync(forceRefresh),
         KnowBellevueModel.LoadItemsAsync(forceRefresh),
     };
     await Task.WhenAll(loadTasks);
 }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

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

                if (e.NavigationMode != NavigationMode.Back)
                {
                    GETLOCATIONModel.SelectItem(e.Parameter);
                }

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