Skip to main content
Home Forums General Silverlight New Features in Silverlight 3 Checkbox doesn't "refresh" when datacontext changed?
1 replies. Latest Post by mtiede@swtechnologies.com on July 2, 2009.
(0)
mtiede@s...
Member
148 points
275 Posts
07-02-2009 1:31 PM |
I have a checkbox on a navigation page that I have bound to a field in the datacontext. I modify one textbox and one checkbox control. When I press a button, I go to WCF and get new data and then replace the datacontext of the page. The textbox text changes, but the checkbox ischecked property remains whatever it was before I pressed the button. Is IsChecked NOT the thing to bind to the data?
Oh, the field that is being bound to the checkbox is a nullable boolean (if that makes any difference). The textbox that works is bound to a nullable string.
07-02-2009 2:10 PM |
I ended up changing the IsThreeWay="True", but that didn't help. Then I added Mode=TwoWay to the binding. Then it worked right.
I guess I am surprised that TextBox worked without saying the Mode, but CheckBox required it, I guess.