title: Xaml - Unable to get item Name in class file (inside listView)
body: <p>I'm making an XAML app and i'm having some issues binding my xaml file with its class .</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage
  x:Class="App.TestXaml"
  xmlns="http://xamarin.com/schemas/2014/forms"
  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"&gt;
  
      &lt;ContentPage.Content&gt;
  
   &lt;ListView x:Name="ListTest"&gt;
  
        &lt;Label FontSize="12" x:Name="test1"/&gt;
  
  
          &lt;ListView.ItemTemplate&gt;
  
                   &lt;DataTemplate&gt; 
  
                      &lt;ViewCell&gt;
  
                              &lt;StackLayout Spacing="5" Orientation="Horizontal"&gt;
  
                                  &lt;Label FontSize="14" x:Name="test2"/&gt;
  
                              &lt;/StackLayout&gt;
  
                      &lt;/ViewCell&gt;
  
                  &lt;/DataTemplate&gt;
  
            &lt;/ListView.ItemTemplate&gt;
  
      &lt;/ListView&gt;
  
      &lt;/ContentPage.Content&gt;
  
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>in my cs file testXaml.cs thats linked to this xaml :</p>
  
  <pre><code>test1.FontSize = 20 ; 
  </code></pre>
  
  <p>// Works - it detects the test1 variable for that label.</p>
  
  <p>In my listview however , when i try to access the label named test2 , it does not detect it in my cs file</p>
  
  <pre><code>test2.FontSize = 24 ; 
  </code></pre>
  
  <p>// The class does not detect test2 (The name test2 does not exist in the current context)</p>
  
  <p>Any idea how to fix this or set up a value for the list items from my cs file ?</p>