<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"              xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"              xmlns:local="clr-namespace:Tree"              x:Class="Tree.MainPage">      <StackLayout>         <Entry Text="{Binding Circonference}" Placeholder ="Circonference (cm)"/>         <Entry Text="{Binding Hauteur}" Placeholder ="Hauteur (m) :"/>         <Entry Text="{Binding Espece}" Placeholder ="Espèce"/>         <Button Text="Envoyer" Clicked="OnSendClicked"/>         <ListView x:Name="ArbreList" SeparatorVisibility="Default" SeparatorColor="Black" HasUnevenRows="True">             <ListView.ItemTemplate>                 <DataTemplate>                     <ViewCell>                         <StackLayout>                             <Label Text="{Binding Circonference, Mode=OneWay, StringFormat='Circonference : {0}'}"/>                             <Label Text="{Binding Hauteur, Mode=OneWay, StringFormat='Hauteur : {0}'}"/>                             <Label Text="{Binding Espece, Mode=OneWay, StringFormat='Espèce : {0}'}"/>                             <Label Text="{Binding Annee, Mode=OneWay, StringFormat='Année de Plantation : {0}'}" TextColor="Blue" FontAttributes="Bold"/>                         </StackLayout>                     </ViewCell>                 </DataTemplate>             </ListView.ItemTemplate>         </ListView>     </StackLayout>  </ContentPage>

using System; using System.Collections.ObjectModel; using Xamarin.Forms; namespace Tree {     public partial class MainPage : ContentPage     {         private ArbreViewModel ArbreViewModel { get; set; } = new ArbreViewModel();         private ObservableCollection<ArbreViewModel> ArbresList { get; set; } = new ObservableCollection<ArbreViewModel>();         public MainPage() 		{             BindingContext = ArbreViewModel;             InitializeComponent();             ArbreList.ItemsSource = ArbresList;          }          private async void OnSendClicked(object sender, EventArgs e)         {             var arbreVM = new ArbreViewModel(ArbreViewModel);             ArbresList.Add(arbreVM);             await arbreVM.ComputeAnnee();         }     } }

 
public class ArbreViewModel : INotifyPropertyChanged     {         public event PropertyChangedEventHandler PropertyChanged;         private void OnPropertyChanged(string name)         {             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));         }         public string Circonference         {             get             {                 return arbre.Circonference == 0 ? null : arbre.Circonference.ToString();             }             set             {                 int intVal;                 int.TryParse(value, out intVal);                 if (arbre.Circonference != intVal)                 {                     arbre.Circonference = intVal;                     OnPropertyChanged(nameof(Circonference));                 }             }         } }

        
public async Task ComputeAnnee() {   .   .   .    response  = await client.PostAsync("", new StringContent(jsonReq, Encoding.UTF8, "application/json"));   .   .   . }