Quantcast
Viewing all articles
Browse latest Browse all 18858

Animate based on Routed Event

Hi All,

In my application I was mouse down the Main Window, the bottom of the widows Border height animated 0 to 100 like below code snippet

<Window.Triggers>
    
            <EventTrigger RoutedEvent="Window.MouseDown" >
            <BeginStoryboard x:Name="begin" >
                <Storyboard >
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Visibility)">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"  />
                      
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0:0:.4"
                                     From="0"
                                     Storyboard.TargetName="border"
                                     Storyboard.TargetProperty="Height"
                                     To="100" />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
       
    </Window.Triggers>

My requirement is, when again mouse down the window then Border Height will be animated from 100 to 0(that mean Border will be hide) like Windows 8 App bar window. How can i achieve this?

Regards,

M. Sheik


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>