Welcome to WindowsClient.net | Sign in | Join

Basic Animation in WPF Using XAML

WPF has animation functionality that allows developers to easily add dynamic effects to their applications. While the full range of WPF’s animation classes can seem daunting, animation in WPF can be broken down to simply varying the value of a property over time.  Animation can be accomplished in WPF through procedural code or directly in XAML.  In this basic animation training video, Todd Miranda demonstrates a XAML-only approach to animation in WPF.

Author: Todd Miranda

Duration: 19:36

Video Downloads:
WMV | WMV (Zip) | Zune | iPod | PSP | MPEG-4 | 3GP

Audio Downloads:
AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Sample Code:
VB | C#

You must Login to comment.Comments: 1

namhyuk: On February 1, 2010 2:30 PM said:

<Ellipse Width="100" Height="50" Margin="0" Fill="Blue" x:Name="ellipse">

           <Ellipse.Triggers>

               <EventTrigger RoutedEvent="Ellipse.MouseLeftButtonDown">

                   <EventTrigger.Actions>

                       <BeginStoryboard>

                           <Storyboard>

                               <DoubleAnimation Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Ellipse.RenderTransform).(ScaleTransform.ScaleX)" Duration="0:0:5" To="2" AutoReverse="True" />

                               <DoubleAnimation Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Ellipse.RenderTransform).(ScaleTransform.ScaleY)" Duration="0:0:3" To="3" AutoReverse="True" />

                           </Storyboard>

                       </BeginStoryboard>

                   </EventTrigger.Actions>

               </EventTrigger>

           </Ellipse.Triggers>

           <Ellipse.RenderTransform>

               <ScaleTransform ScaleX="1" ScaleY="1" />

           </Ellipse.RenderTransform>

</Ellipse>

 



Featured Item