I've created a UserControl with an ItemContext DependencyProperty. This property contains the name of the property of my DataContext object the Control's text property should bind to.
I cannot figure out how to do this in XAML. I tried several steps, I'm quite near but couldn't find it.
Something like this:
But here the contents of "ItemContext" is bound directly to the Text Property which I don't want. The contents of "ItemContext" let's say "Property1" is the name of the property in my DataContext I'd like to bind to.
In code it works like this:
this.txtValue0.SetBinding(TextBox.TextProperty, new Binding(this.ItemContext) { Mode = BindingMode.TwoWay });
Does someone have an idea?
Thanks
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)