I have a list box which contains a usercontrol. And the user controls 2-3 text boxes defined in it.How do i enable data binding on those text boxes?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can simply create
DependencyProperty-s for each of them, and you can directly bind through the xaml like so:To create a
DependencyProperty, you can be as lazy as writing"propdp" + TAB. There are tons of articles, blog posts and general information available on the subject ofDependencyPropertys, so have at it. A good place to start would be:http://msdn.microsoft.com/en-us/library/ms752914.aspx
http://msdn.microsoft.com/en-us/library/system.windows.dependencyproperty.aspx
What is a dependency property?
Good luck! They’re really fun to work with. 🙂