开发者

Silverlight Fluid UI - Turn off ListBox Animations

开发者 https://www.devze.com 2023-02-26 04:57 出处:网络
I have some simple fade-in and fade-out ListBox item animations from the Charles Petzold article on making a Silverlight Fluid UI

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号