title: WPF - binding to an explicitly implemented interface property from code behind/attached behaviour
body: <p>I am trying to set up a binding to an explicitly implemented interface property from code-behind.  The reason for the code-behind binding is that the path to the bound property can only be determined at run-time.</p>
  
  <p>In the XAML, it is possible to bind thusly (example in MainWindow.xaml):</p>
  
  <pre><code>&lt;TextBox Text="{Binding (local:IViewModel.Property)}"/&gt;
  </code></pre>
  
  <p>and in fact, binding in the code behind works in a similar way (from MainWindow.xaml.cs):</p>
  
  <pre><code>var binding = new Binding("(local:IViewModel.Property)");
  </code></pre>
  
  <p>since WPF is able to pick up the namespace mapping.</p>
  
  <p>My question is, how do I form a binding like this when the namespace mapping is not present (for example, in an attached behaviour)?</p>
  
  <p>Many thanks in advance!</p>