<p>I have the following class</p>

<pre>
public class Car
{
   public Name {get; set;}
}
</pre>

<p>and I want to bind this programmatically to a text box.</p>

<p>How do I do that?</p>

<p>Shooting in the dark:</p>

<pre>
...
Car car = new Car();
TextEdit editBox = new TextEdit();
editBox.DataBinding.Add("Name", car, "Car - Name");
...
</pre>

<p>I get the following error</p>

<blockquote>
  <p>"Cannot bind to the propery 'Name' on the target control.</p>
</blockquote>

<p>What am I doing wrong and how should I be doing this? I am finding the databinding concept a bit difficult to grasp coming from web-development.</p>

Without looking at the syntax, I'm pretty sure it's:
```
```
editBox.DataBinding.Add("Text", car, "Name");
```
```