I have some simple fade-in and fade-out ListBox item animations from the Charles Petzold article on making a Silverlight Fluid UI
<VisualStateGroup x:Name="LayoutStates">
<VisualState x:Name="AfterLoaded">
<Storyboard>
<DoubleAnimation
Duration="00:00:1"
From="0" To="1"
Storyboard.TargetName="rootGridElement"
Storyboard.TargetProperty="Opacity" />
</Storyboard>
</VisualState>
<VisualState x:Name="BeforeUnloaded" />
<VisualStateGroup.Transitions>
<VisualTransition From="AfterLoaded" To="BeforeUnload" GeneratedDuration="0:0:0.5">
<Storyboard>
<DoubleAnimation
Duration="00:00:0.5"
To="0"
Storyboard.TargetName="rootGridElement"
Storyboard.TargetProperty="Opacity" />
</Storyboard>
开发者_StackOverflow中文版 </VisualTransition>
</VisualStateGroup.Transitions>
</VisualStateGroup>
My question is, is there any way to temporarily turn off these animations? I'm basically wanting to occasionally clear the whole ListBox in one fell swoop without having anything fade out. I looked for some sort of IsEnabled property somewhere in there to bind to, but couldn't find anything.
Thanks!
精彩评论