I am trying to bind to an explicitly implemented property of an interface from code. The reason for code binding is that the path to the related property can only be determined at runtime.
In XAML, you can link (for example, in MainWindow.xaml):
<TextBox Text="{Binding (local:IViewModel.Property)}"/>
and in fact, the binding in the code behind works the same way (from MainWindow.xaml.cs):
var binding = new Binding("(local:IViewModel.Property)");
since WPF can display a namespace mapping.
My question is, how can I create a binding like this when the namespace mapping is missing (e.g. in the attached behavior)?
Thank you very much in advance!
source share