title: WPF data binding with inner elements
body: <p>I want to bind my StackPanel component to an object and its properties to elements it the StackPanel</p>
  
  <pre><code>&lt;StackPanel Grid.Column="0" Grid.Row="0" Name="device1" Background="#CC119EDA" DataContext="{Binding}"&gt;
      &lt;Label FontSize="22" Foreground="White"&gt;Desk #1&lt;/Label&gt;                   
      &lt;TextBox Text="{Binding Name}" /&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>In code behind</p>
  
  <pre><code>device1.DataContext = new Class { Name = "Name" };
  </code></pre>
  
  <p>What is wrong with this binding? Thanks</p>