Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

how to add a listview to each of tabbed content page?

$
0
0

here I am adding 2 content page inside one tabbed page.

this.Children.Add(new ContentPage { Title = "Tab 1" });
            this.Children.Add(new ContentPage { Title = "Tab 2"});

and I want to add a listview to each of tabbed content page,so how to do this? :)

here is my listview

var listview = new RadListView
            {
                BackgroundColor = Color.White,
                ItemsSource = buyerList,
                ItemTemplate = new DataTemplate(() =>
                  {
                      var cell = new ListViewTextCell
                      {
                          TextColor = Color.Black,
                          DetailColor = Color.Gray,
                      };

                      cell.SetBinding(ListViewTextCell.TextProperty, new Binding(nameof(Buyer.Name)));
                      cell.SetBinding(ListViewTextCell.DetailProperty, new Binding(nameof(Buyer.Address)));

                      return cell;
                  }),
                LayoutDefinition = new ListViewLinearLayout { ItemLength = 70 },
            };

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>