Maybe have a play with UpdateSourceTrigger and BindingExpression...

http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger(VS.95).aspx



From: [email protected] 
[mailto:[email protected]] On Behalf Of Stephen Price
Sent: Wednesday, 14 April 2010 3:57 PM
To: ozSilverlight
Subject: Closing childwindow

Hey all,

I've hit what seems to be a race condition, I've got a login usercontrol which 
uses a ChildWindow. when the user presses enter on the passwordbox I check if 
the key == key.enter and if the password is not blank I set the 
this.DialogResult = true; which seems to be closing the ChildWindow before the 
databinding has updated the underlaying property. Net result is if user presses 
enter then the password is null even if they have typed in a password.

I've tried both keydown and keyup with same outcome. Any suggestions on how I 
can get it to close the window after the databinding has done its thing? 
Alternatively perhaps invoke the click event on the OK button . Any ideas?

cheers,
Stephen


_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to