title: Can't change textbox text XAML, C++/CX: Undeclared Identifier
body: <p>I need to be able to update the text in a XAML TextBox element when a button is clicked. I was able to do this with the example Hello World application on Microsoft's website with no issues, but when I attempt it now doing the exact same thing, I'm getting an undeclared identifier error on the text box.</p>
  <p>This is my XAML code:</p>
  <pre><code>&lt;Button Background=&quot;Black&quot; Content=&quot;This is a Button&quot; Width=&quot;400&quot; Height=&quot;100&quot; Click=&quot;Button_Click&quot;/&gt;
  &lt;TextBox Grid.Column=&quot;1&quot; x:Name=&quot;textBox&quot;/&gt;
  </code></pre>
  <p>This is my C++ code:</p>
  <pre><code>void Sentinel::VisualizePage::Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) {   
      textBox-&gt;Text = &quot;Hi&quot;;
  }
  </code></pre>
  <p>And here's the error: <br>
  <img src="https://i.stack.imgur.com/2wlC9.png" alt="1" /><br>
  I don't understand how this exact same code was working for the hello world project, but is not working for this user control.</p>