title: WPF: Data binding with code
body: <p>How do I use data-binding from code (C# or VB)?</p>
  
  <p>This is what I have so far, but it is displaying <code>Binding.ToString</code> instead of <code>m_Rep.FirstName</code>.</p>
  
  <pre><code>Public ReadOnly Property TabCaption As Object 
      Get
          Return New Label With {.Foreground = Brushes.Black, .Content = New Binding("FirstName"), .DataContext = m_Rep}
      End Get
  End Property
  </code></pre>