Ejemplo n.º 1
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await JaliyasBlogModel.LoadItemsAsync();

            DataContext = this;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Load ViewModel items asynchronous
 /// </summary>
 public async Task LoadDataAsync(bool forceRefresh = false)
 {
     var loadTasks = new Task[]
     {
         AboutModel.LoadItemsAsync(forceRefresh),
         PrabathsBlogModel.LoadItemsAsync(forceRefresh),
         JaliyasBlogModel.LoadItemsAsync(forceRefresh),
         ChamindasBlogModel.LoadItemsAsync(forceRefresh),
         MalinsBlogModel.LoadItemsAsync(forceRefresh),
     };
     await Task.WhenAll(loadTasks);
 }
Ejemplo n.º 3
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

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

                JaliyasBlogModel.SelectItem(e.Parameter);

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