public async Task LoadBlogpost(object sender, SelectedItemChangedEventArgs e) { BlogPosts.Post blogPost = (BlogPosts.Post)((ListView)sender).SelectedItem; if (e.SelectedItem == null) { return; } ((ListView)sender).SelectedItem = null; await Navigation.PushModalAsync(new BlogDetailPage(blogPost)); }
public BlogDetailPage(BlogPosts.Post blogPost) { BackgroundColor = Color.FromHex("#F1ECCE"); Title = "Blog Post"; blogString = StripHtml(blogPost.caption); #if __ANDROID__ Padding = new Thickness(5, 5, 5, 5); #endif #if __IOS__ Padding = new Thickness(10, 30, 10, 10); #endif globalBlogPost = blogPost; BuildPageObjects(); }