title: How to Access Entry TextBox value in Xamarin Forms within a Content Template
body: <p>I have a Xamarin Form XAML that I would like to reset the value of a bound entry textbox:</p>
  
  <pre><code>&lt;ContentView Grid.Row="2"  Margin="30,0,30,0" BackgroundColor="White" Padding="1"&gt;
                          &lt;Entry 
                              x:Name="txtLastName" 
                          Text="{TemplateBinding BindingContext.ContactDetails.LastName}" 
                          Placeholder="Last Name" PlaceholderColor="#cccccc" HeightRequest="40" 
                          TextColor="Black" FontSize="Medium"
                          VerticalOptions="End" HorizontalOptions="FillAndExpand"/&gt;
                      &lt;/ContentView&gt;
  </code></pre>
  
  <p>Is there a way to make the value within the Entry accessible via code behind (say through a button click), if I wanted to perform an action (such as setting the value within to empty)</p>
  
  <pre><code>  private void ClearTextBoxesButtonClicked(object sender, EventArgs e)
  {
              //Clear value
              this.FindByName&lt;Entry&gt;("txtLastName").Text = string.Empty;
  
  }
  </code></pre>
  
  <p>Doing the above results in null value of the textbox, which isn't populated even though the field is populated in the form. It seems as if it cannot find the textbox.</p>
  
  <p>Any pointers much appreciated.</p>