Friday, 15 March 2013

windows runtime - Why VisualStateManager is not working? -



windows runtime - Why VisualStateManager is not working? -

here's usercontrol:

<grid x:name="layoutroot"> <border x:name="border1" background="green"> <textblock text="hello, world!"></textblock> </border> </grid> <visualstatemanager.visualstategroups> <visualstategroup > <visualstate x:name="examplestate"> <storyboard> <objectanimationusingkeyframes storyboard.targetproperty="background" storyboard.targetname="border1"> <discreteobjectkeyframe keytime="0" value="red"> </discreteobjectkeyframe> </objectanimationusingkeyframes> </storyboard> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups>

and somewhere in codebehind:

public dialerview() { this.initializecomponent(); //layoutroot.datacontext = this; visualstatemanager.gotostate(this, "examplestate", false); }

please, explain, why border1 doesn't alter it's color red?

yes, vsm should in grid , work now.

windows-runtime winrt-xaml

No comments:

Post a Comment