Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi,

I have a TextBox and a string variable named FirstName.

I want to bind this variable to that texbox.
That means when I change value of FirstName also textbox text will change automatically.
Posted
Updated 1-Jun-11 21:48pm
v3
Comments
Dalek Dave 2-Jun-11 3:48am    
Edited for Grammar and Spelling.

You really need to start from the basics!
Begin using msdn[^].

You might also want to consider reading some books on WPF.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Jun-11 3:47am    
Good place to start for sure, a 5.
--SA
Abhinav S 2-Jun-11 4:17am    
Thanks SA.
BobJanova 2-Jun-11 4:53am    
Good link.
Abhinav S 2-Jun-11 6:59am    
Thank you.
This is very basic stuff...

Read This.[^]
 
Share this answer
 
Comments
Tarun.K.S 2-Jun-11 4:05am    
No that's not what OP meant! :doh:
Dalek Dave 2-Jun-11 4:19am    
Given how scant the posting was I am surprised that anyone could tell what he wanted.
Tarun.K.S 2-Jun-11 5:43am    
I beg to differ here, OP wanted to get notified whenever the property "FirstName" changes. For this, OP has to implement IPropertyNotifyChanged interface and bind the property to the textbox and rest of the job will be done by the WPF engine.
Dalek Dave 2-Jun-11 5:46am    
I read it as he wanted the text in the textbox to change when he changed the value of a variable.
That is actually what he asked.
Tarun.K.S 2-Jun-11 6:33am    
And what does the code specified in your link do? Also I didn't vote your 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