title: Get Entry value in ListView Xamarin forms
body: <p>I am novice in Xamarin Forms. I am trying to catch all <code>Entry</code> value in ListView when I click on the Label &quot;OK&quot;.</p>
  <p>Here is my ListView XAML code:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;StackLayout&gt;
      &lt;ListView x:Name=&quot;TestList&quot;&gt;
          &lt;ListView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ViewCell&gt;
                      &lt;StackLayout Padding=&quot;10,5,5,5&quot; VerticalOptions=&quot;StartAndExpand&quot; Orientation=&quot;Vertical&quot;&gt;
  &lt;!-- here I am getting the value of word--&gt;
                          &lt;Label TextColor=&quot;Black&quot; Text=&quot;{Binding  Word1}&quot;  FontSize=&quot;15&quot; /&gt;
  &lt;!-- here I am putting some text that I want to catch after--&gt;
                          &lt;Entry Placeholder=&quot;Your traduction&quot; x:Name=&quot;mytestEntry&quot; Completed=&quot;Entry_Completed&quot; PlaceholderColor=&quot;#bababa&quot; FontSize=&quot;16&quot; /&gt;
                          &lt;Label TextColor=&quot;Black&quot; Text=&quot;{Binding  ValueAnswer}&quot; FontSize=&quot;15&quot; /&gt;
                      &lt;/StackLayout&gt;
                  &lt;/ViewCell&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
      &lt;/ListView&gt;
  &lt;!-- when I tapp on the label &quot;OK&quot;, I would like to catch all entry value in ListView --&gt;
      &lt;Label Text=&quot;OK&quot;  FontSize=&quot;30&quot; HorizontalOptions=&quot;Center&quot; TextColor=&quot;#A4978E&quot;&gt;
          &lt;Label.GestureRecognizers&gt;
              &lt;TapGestureRecognizer Tapped=&quot;OnResultTest&quot; /&gt;
          &lt;/Label.GestureRecognizers&gt;
      &lt;/Label&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  <p>Here is my C# code :</p>
  <pre><code>List&lt;MyWords&gt; myWords = mywordsdatabase.GetListWords();
  List&lt;TestModel&gt; ListWordsTest = new List&lt;TestModel&gt;();
  foreach (MyWords w in myWords)
  {
      var testmodel = new TestModel
      {
          Word1 = w.Word1.ToString(),
          Entryreponse = &quot;put some text here&quot;,
          ValueAnswer = &quot;&quot;
      };
  
      ListWordsTest.Add(testmodel);
  
      i++;
  }
  
  TestList.ItemsSource = ListWordsTest;
  </code></pre>
  <p>I have tried this method to catch entry but it is not working, I would like to catch all the listview entry when I tapped on &quot;OK&quot; Label and change their values to do other stuff :</p>
  <pre><code>public void OnResultTest(object sender, EventArgs args)
  {
      foreach (var item in TestList.ItemsSource)
      {
          // cast the item 
          var dataItem = (TestModel)item;
          Console.WriteLine( dataItem.Entryreponse); //output : &quot;put some text here&quot;
      }
  }
  </code></pre>
  <p>If you have a better solution I will take, thanks in advance.</p>