title: Can i directly use TemplatedItems of ListView in Xamarin.Forms to update properties?
body: <p>Because of some special reason i can not use <a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/data-binding/" rel="nofollow noreferrer">Xamarin.Forms Data Binding</a>, I must directly update the properties of view which created by ItemTemplate in ListView.</p>
  <p>MainPage.xaml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;ContentPage
      x:Class=&quot;TestListView.MainPage&quot;
      xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;&gt;
      &lt;Grid&gt;
          &lt;ListView x:Name=&quot;TestListView&quot; /&gt;
          &lt;Button
              Clicked=&quot;Button_Clicked&quot;
              HorizontalOptions=&quot;Center&quot;
              Text=&quot;Change last appearing text&quot;
              VerticalOptions=&quot;Center&quot; /&gt;
      &lt;/Grid&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  <p>MainPage.xaml.cs</p>
  <pre><code>using System.Linq;
  using Xamarin.Forms;
  
  namespace TestListView {
      public partial class MainPage : ContentPage {
          private int lastApprearingItemIndex = -1;
          public MainPage() {
              InitializeComponent();
              TestListView.ItemTemplate = new DataTemplate(() =&gt; {
                  return (new ViewCell() {
                      View = new Label()
                  });
              });
              TestListView.ItemsSource = Enumerable.Range(1, 10000).ToArray();
              TestListView.ItemAppearing += TestListView_ItemAppearing;
          }
          private void TestListView_ItemAppearing(object sender, ItemVisibilityEventArgs e) {
              lastApprearingItemIndex = e.ItemIndex;
              ((Label)(((ViewCell)(TestListView.TemplatedItems[e.ItemIndex])).View)).Text = &quot;test text for id &quot; + (int)(e.Item);
          }
          private void Button_Clicked(object sender, System.EventArgs e) {
              ((Label)(((ViewCell)(TestListView.TemplatedItems[lastApprearingItemIndex])).View)).Text = &quot;(changed)test text for id &quot; + lastApprearingItemIndex;
          }
      }
  }
  </code></pre>
  <p>This test runs well in android
  <a href="https://i.stack.imgur.com/cTnXj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cTnXj.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/onuQ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/onuQ6.png" alt="enter image description here" /></a></p>
  <p>But in UWP it shows nothing</p>
  <p><a href="https://i.stack.imgur.com/ZQzoc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZQzoc.png" alt="enter image description here" /></a></p>
  <p>It runs well also in WPF.</p>
  <p>So i have two questions:</p>
  <p>1,Why doesn't it work in UWP?</p>
  <p>2,Will ListView reuse the view of item like <a href="https://developer.android.com/reference/android/widget/ListAdapter" rel="nofollow noreferrer">ListAdapter</a> in android?</p>