wpf - Animation does not stop on Trigger Exit -


i try change animation when triggers changes - old animation doesnt stop:

<tabcontrol>     <tabitem header="dummy"></tabitem>     <tabitem>         <tabitem.header>             <path margin="20,0" width="40.3295" height="32.775" stretch="fill"  data="m 300 100 l 500 400 100 400 z" fill="gold">                                     <path.style>                     <style targettype="path">                         <style.triggers>                             <datatrigger binding="{binding relativesource={relativesource findancestor, ancestortype={x:type tabitem}}, path=isselected}" value="true">                                 <datatrigger.enteractions>                                     <beginstoryboard>                                         <storyboard storyboard.targetproperty="fill.(solidcolorbrush.color)">                                             <coloranimation repeatbehavior="forever" from="green" to="blue" duration="0:0:1.5" />                                         </storyboard>                                     </beginstoryboard>                                 </datatrigger.enteractions>                                 <datatrigger.exitactions>                                     <beginstoryboard>                                         <storyboard fillbehavior="stop" duration="0" />                                     </beginstoryboard>                                 </datatrigger.exitactions>                             </datatrigger>                             <datatrigger binding="{binding relativesource={relativesource findancestor, ancestortype={x:type tabitem}}, path=isselected}" value="false">                                 <datatrigger.enteractions>                                     <beginstoryboard>                                         <storyboard storyboard.targetproperty="fill.(solidcolorbrush.color)">                                             <coloranimation repeatbehavior="forever" from="red" to="yellow" duration="0:0:1.5" />                                         </storyboard>                                     </beginstoryboard>                                 </datatrigger.enteractions>                                 <datatrigger.exitactions>                                     <beginstoryboard>                                         <storyboard fillbehavior="stop" duration="0" />                                     </beginstoryboard>                                 </datatrigger.exitactions>                             </datatrigger>                         </style.triggers>                     </style>                 </path.style>             </path>         </tabitem.header>         <textblock>4</textblock>     </tabitem> </tabcontrol> 

the animation not-selected tab keeps running. know how stop that? :)

try this

  <tabcontrol>         <tabitem header="dummy"></tabitem>         <tabitem>             <tabitem.header>                 <path margin="20,0" width="40.3295" height="32.775" stretch="fill"  data="m 300 100 l 500 400 100 400 z" fill="gold">                     <path.style>                         <style targettype="path">                             <style.triggers>                                 <datatrigger binding="{binding relativesource={relativesource findancestor, ancestortype={x:type tabitem}}, path=isselected}" value="true">                                     <datatrigger.enteractions>                                         <beginstoryboard x:name="start">                                             <storyboard storyboard.targetproperty="fill.(solidcolorbrush.color)">                                                 <coloranimation repeatbehavior="forever" from="green" to="blue" duration="0:0:1.5" />                                             </storyboard>                                         </beginstoryboard>                                     </datatrigger.enteractions>                                     <datatrigger.exitactions>                                         <beginstoryboard>                                             <storyboard fillbehavior="stop" duration="0" />                                         </beginstoryboard>                                     </datatrigger.exitactions>                                                                       </datatrigger>                                 <datatrigger binding="{binding relativesource={relativesource findancestor, ancestortype={x:type tabitem}}, path=isselected}" value="false">                                     <datatrigger.enteractions>                                         <beginstoryboard name="unselectedstoryboard">                                             <storyboard storyboard.targetproperty="fill.(solidcolorbrush.color)">                                                 <coloranimation repeatbehavior="forever" from="red" to="yellow" duration="0:0:1.5" />                                             </storyboard>                                         </beginstoryboard>                                     </datatrigger.enteractions>                                     <datatrigger.exitactions>                                         <stopstoryboard beginstoryboardname="unselectedstoryboard" ></stopstoryboard>                                     </datatrigger.exitactions>                                 </datatrigger>                             </style.triggers>                         </style>                     </path.style>                 </path>             </tabitem.header>             <textblock>4</textblock>         </tabitem>     </tabcontrol> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -