title: Binding properties in code behind
body: <p>I have WPF application and a window in it. Lets have something like this in my xml:</p>
  
  <pre><code>&lt;Label Name="TitleLabel" Content="Some title" \&gt;
  &lt;Label Name="BottomLabel" Content="{Binding ElementName=TitleLabel Path=Content"&gt;
  </code></pre>
  
  <p>Lets say I don't cannot use xml for creation of <code>BottomLabel</code> and <code>TitleLabel</code>. So I have to create the BottomLabel as a property in my "Code behind". How do I specify the same binding for <code>Content</code> property of Bottom label in my code behind ? Is it possible at all ?</p>
  
  <p>So I would have something like this:</p>
  
  <pre><code>public Label TitleLabel {get; private set;}
  public Label BottomLabel {get; private set;}
  
  public MyClass(){
      TitleLabel = new Label();
      TitleLabel.Content = "Some title";
      BottomLabel = new Label();
      BottomLabel.Content = // ?? what should be here ? How do I specify the binding
                            // that binds BottomLabel.COntent to TitleLabel.Content?
  }
  </code></pre>
  
  <p>What can I write instead of the comment ?
  Thank you for ansvers.</p>