void LoadContentViews() { Device.BeginInvokeOnMainThread(async() => { // load data first ApiServiceIndividual apiServ = new ApiServiceIndividual(); AnnouncementsSource = await apiServ.GetAnnouncementsAsync(); // setup banners here // need to pull from db SwipeSource = new List <SfRotatorItem>() { new SfRotatorItem() { ItemContent = new Label { Text = "tab image 1 will be here", TextColor = Color.Black }, BackgroundColor = Color.Transparent }, new SfRotatorItem() { ItemContent = new Label { Text = "tab image 2 will be here", TextColor = Color.Black }, BackgroundColor = Color.Transparent }, new SfRotatorItem() { ItemContent = new Label { Text = "tab image 3 will be here", TextColor = Color.Black }, BackgroundColor = Color.Transparent }, new SfRotatorItem() { ItemContent = new Label { Text = "tab image 4 will be here", TextColor = Color.Black }, BackgroundColor = Color.Transparent } }; AnnouncementContent = new HomePageContent(); SetAnnouncements(); }); Task.Run(async() => { ApiServiceIndividual apiServ = new ApiServiceIndividual(); AppliedJobsSource = await apiServ.GetAppliedJobsAsync(); AppliedJobsContent = new AppliedJobsContent(); }); Task.Run(async() => { ApiServiceIndividual apiServ = new ApiServiceIndividual(); MyProgramsSource = await apiServ.GetMyProgramsAsync(); // add employer id if logged on MyProgramsContent = new MyProgramsContent(); // bind data here }); }
void LoadContentViews() { Device.BeginInvokeOnMainThread(async() => { // load data first ApiServiceIndividual apiServ = new ApiServiceIndividual(); MatchedJobsSource = await apiServ.GetMatchedJobsAsync(); MatchedJobsContent = new MatchedJobsContent(); SetMatchedJobs(); }); Task.Run(async() => { ApiServiceIndividual apiServ = new ApiServiceIndividual(); AppliedJobsSource = await apiServ.GetAppliedJobsAsync(); AppliedJobsContent = new AppliedJobsContent(); }); Task.Run(async() => { ApiServiceIndividual apiServ = new ApiServiceIndividual(); WatchListJobsSource = await apiServ.GetWatchedJobsAsync(); WatchListContent = new WatchListContent(); // bind data here }); }