c# - Interaction.Behaviors is not working for button content -



c# - Interaction.Behaviors is not working for button content -

i have created animation on button content in xaml page, in windows silverlight phone 8. when moved project windows phone 8.1 rt.. animation of button content not working working in silverlight phone project.

i have added below code have implemented in silverlight phone 8..

interaction.behaviors code part not working.. have added behaviour sdk windows phone 8.1 in reference...

i have added below 3 using interactivity..

xmlns:i="using:microsoft.xaml.interactivity" xmlns:ic="using:microsoft.xaml.interactions.core" xmlns:im="using:microsoft.xaml.interactions.media" xaml <button x:name="menubutton" style="{staticresource pagenumberbuttonstyle}" height="180" margin="10" width="240" click="menubuttonclick" content="{binding currentpage.number}" fontfamily="ms-appx:///fonts/sesamewkshpregular.ttf#sesamewkshp rg" horizontalalignment="left" rendertransformorigin="0.5,0.5" verticalalignment="bottom"> <button.rendertransform> <compositetransform x:name="menubuttonscale" scalex="0" scaley="0" /> </button.rendertransform> </button> <page.resources> <resourcedictionary> <!-- pagenumberbuttonstyle --> <style x:key="pagenumberbuttonstyle" targettype="button"> <setter property="template"> <setter.value> <controltemplate targettype="button"> <grid> <visualstatemanager.visualstategroups> <visualstategroup x:name="focusstates"> <visualstate x:name="unfocused" /> <visualstate x:name="focused" /> </visualstategroup> <visualstategroup x:name="pagenumberstates"> <visualstate x:name="bindingchanged"> <storyboard> <doubleanimation from="1" to="0" storyboard.targetproperty="(uielement.opacity)" storyboard.targetname="contentpresenter" /> </storyboard> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups> <grid.background> <imagebrush stretch="none" imagesource="/resources/assets/book-solid.png" /> </grid.background> <contentpresenter x:name="contentpresenter" horizontalalignment="center" verticalalignment="center" margin="0,20,0,0" rendertransformorigin="0.5,0.5"> <contentpresenter.rendertransform> <compositetransform x:name="contenttransform" scalex="0.5" scaley="0.5" /> </contentpresenter.rendertransform> </contentpresenter> <i:interaction.behaviors> <ic:datatriggerbehavior binding="{binding currentpage.number}"> <im:controlstoryboardaction controlstoryboardoption="play"> <im:controlstoryboardaction.storyboard> <storyboard> <doubleanimation from="0" to="1" duration="0:0:1" storyboard.targetproperty="scalex" storyboard.targetname="contenttransform"> <doubleanimation.easingfunction> <elasticease easingmode="easeout" oscillations="2" springiness="5" /> </doubleanimation.easingfunction> </doubleanimation> <doubleanimation from="0" to="1" duration="0:0:1" storyboard.targetproperty="scaley" storyboard.targetname="contenttransform"> <doubleanimation.easingfunction> <elasticease easingmode="easeout" oscillations="2" springiness="5" /> </doubleanimation.easingfunction> </doubleanimation> </storyboard> </im:controlstoryboardaction.storyboard> </im:controlstoryboardaction> </ic:datatriggerbehavior> </i:interaction.behaviors> </grid> </controltemplate> </setter.value> </setter> <setter property="fontsize" value="150" /> </style>

please, guide me here problem..

try adding comparisonconditiontype , value attributes datatriggerbehaviour needs status comparing on particular value.

c# windows-8.1 windows-rt

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -