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
Post a Comment