title: Xamarin not finding x:Name on XAML
body: <p>on my Xamarin project Im having an issue finding x:Name on my MainPage.cs...</p>
  
  <p>This is my class called MainWindowViewModel (small application that should really have been renamed)</p>
  
  <pre><code>private string productName { get; set; }
          public string ProductName
          {
              get =&gt; productName;
              set
              {
                  productName = value;
                  OnPropertyChanged("ProductName");
              }
          }
  </code></pre>
  
  <p>is my code for my MainPage.xaml so ProductName is bound to one of the entry box (below)</p>
  
  <pre><code>&lt;Entry Grid.Row="8"
                 x:Name="productNameEntry"
                 Grid.Column="2"
                 Grid.ColumnSpan="3"
                 Grid.RowSpan="2"
                 WidthRequest="120"
                 VerticalOptions="Center"
                 HorizontalOptions="End"
                 Text="{Binding ProductName}"
                 Margin="0,0,45,0" /&gt;
  </code></pre>
  
  <p>This is what I currently have in my MainPage.cs</p>
  
  <pre><code>void SaveButton_Clicked(object sender, System.EventArgs e)
          {
              MainWindowViewModel APR = new MainWindowViewModel()
              {
                  ProductName = productNameEntry,
  
              };
  </code></pre>
  
  <p>I currently have an underline of 'productNameEntry' with an error saying the name does not exist in the current context.</p>