Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a child userconrol with a textbox and i have binded the text property to the respective view model ...

But i would like to bind the same text property to my parent View model property

is it possible.....??
thanks in advance
Posted

What about firing an event? On the TextBox's TextChanged event, set the value of the property in your parent to what is in the TextBox?
 
Share this answer
 
You can't bind the same UI property to two model properties. There are two options here: either have the VM for the text box and the VM for the parent bind to the same model property, or bind the text box to the parent's VM (well, the text property, but that's probably all you're binding from a text box).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900