Today, we will discuss how to show data in ListView with API using Xamarin forms in different platforms.
Let’s start.
Step 1:
Open Visual studio and create an Application. Select new project, then cross-platforms, Blank App (Xamarin.Forms Portable) and enter project name (as figure 1).
Press OK Button as in the following figure 1.

Figure 1
Once you press OK, you can see 6 more projects loaded in Solution like TestApp (Portable), TestApp.Droid, TestApp.iOS, TestApp.UWP, TestApp.Windows, TestApp.WinPhone.
Step 2:
Now we will create a new Xaml page for getting data in listview. So Select TestApp (Portable) project -> right click -> select Add -> Select New item as shown in figure 2.
Figure 2.
When you click a new item then dialog opens, select Cross-platform, then Forms Xaml Page and mention name GetdatainList. After that click Add button as in the following figure 3.
Figure 3
Step 3:
Now open GetdatainList.xaml page and write the following code,
- <StackLayout BackgroundColor="White">
- <ListView x:Name="ListView1" RowHeight="60">
- <ListView.ItemTemplate>
- <DataTemplate>
- <ViewCell>
- <StackLayout Orientation="Vertical" Padding="8,0,8,0">
- <Label Text="{Binding ArticleTitle}" TextColor="#000" FontSize="14" LineBreakMode="TailTruncation" />
- <Label Text="{Binding description}" TextColor="#000" LineBreakMode="TailTruncation" />
- </StackLayout>
- </ViewCell>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </StackLayout>


Mohammad Shahid SolankiPosted Nov 3, 2017, 2:02 AM
Very Good article...
Vignesh ManiPosted May 13, 2016, 7:18 AM
Nice one
Neeraj KumarPosted May 12, 2016, 3:12 PM
Nice Article
Sonu ChaudharyPosted May 12, 2016, 11:23 AM
good start