c# - Silverlight validation. Problem with email validation -


i have text box , want validate valid email in textbox on button "save" click.

but standard validation have strange behaviour. when print new email error , wery annoing. want show error after button click , text box must become valid if got focus. there standard way in model-view-viewmodel.

the default behavior changing bound value in textbox via lostfocus. need change updatesourcetrigger explicit.

<textbox name="mytextbox"          text="{binding path=firstname, updatesourcetrigger=explicit}" /> 

then in code behind have explicitly call updatesource via button click handler.

bindingexpression = mytextbox.getbindingexpression(textbox.textproperty); be.updatesource(); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -