title: Data Binding To Property C# wpf
body: <p>I need to bind a textbox to a property in the code behind, but I want it to be just to a property instead of class,</p>
  
  <p>Instead of this:</p>
  
  <pre><code>public class A
  {
      public string Text { get; set; }
  }
  
  textbox.DataContext = A
  &lt;textbox Text="{Binding Text}"/&gt;
  </code></pre>
  
  <p>I want this:</p>
  
  <pre><code>public string Text { get; set; }
  textbox.DataContext = Text;
  </code></pre>
  
  <p>How can I achieve this?</p>