silverlight - VisualStateManager.GoToState doesn't work when I call it in DependencyProperty -


i create dependencyproperty (for example: myeffect) , use property textbox.

<textbox grid.row="0" x:name="mytextbox"                                                 text ="{binding model.myvalue}"                                                      behaviors:myeffect="{binding effectsample}"> </textbox> 

in propertychangedcallback function, call

mycontrol.setvalue(textbox.textproperty, "hello"); visualstatemanager.gotostate(mycontrol, "invalidfocused", true); 

my textbox display "hello" state doesn't change invalidfocused. how can change state of textbox ?

this off top of head may type passing gottostate method. it's expecting control following, assuming mycontrol being passed in dependencyproperty.

var control = mycontrol control;
visualstatemanager.gotostate(mycontrol, "invalidfocused", true);


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? -