I have a TextBox in my WPF window.
I have a property in the code behind called Text as well.
I want the text property to be bound to the Text property (i.e. when the value changes in the property the textbox value should also be updadated.
Thanks
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 have to set the DataContext of the TextBox control (or of any of its parents) to your window:
then in your XAML: