SizeAnimationBase Class
Collapse the table of content
Expand the table of content

SizeAnimationBase Class

Abstract class that, when implemented, animates a Size value.

Namespace: System.Windows.Media.Animation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

public abstract class SizeAnimationBase : AnimationTimeline
public abstract class SizeAnimationBase extends AnimationTimeline
public abstract class SizeAnimationBase extends AnimationTimeline
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

Notes to Inheritors: See the Custom Animations Overview for information about extending animation classes.

The following code example demonstrates how to use the derived SizeAnimationUsingKeyFrames class in Extensible Application Markup Language (XAML).

<!-- This example shows how to use the SizeAnimationUsingKeyFrames to animate the
size of an ArcSegment. -->
<Page xmlns=""
  xmlns:x="" >

    <Canvas HorizontalAlignment="Left" Margin="0" >

      <!-- Create an arc on the screen that animates its size when it loads. -->
      <Path Stroke="Black" StrokeThickness="2" >
                <PathFigure StartPoint="100,200">
                      <ArcSegment x:Name="myArcSegment" Size="90,80" 
                      SweepDirection="Clockwise"  Point="500,200" />
          <EventTrigger RoutedEvent="Path.Loaded">
            <BeginStoryboard Name="myBeginStoryBoard">
                <!-- Animating the Size property uses 3 KeyFrames. -->
                Storyboard.TargetProperty="Size" >
                    <!-- Using a LinearSizeKeyFrame, the size of the arc increases
                         gradually over the first half second of the animation. -->
                    <LinearSizeKeyFrame KeyTime="0:0:0.5" Value="120,120" />

                    <!-- Using a DiscreteSizeKeyFrame, the size increases suddenly
                    after the first second of the animation. -->
                    <DiscreteSizeKeyFrame KeyTime="0:0:1" Value="150,150" />

                    <!-- Using a SplineSizeKeyFrame, the Size increases slowly at first 
                         and then speeds up exponentially. This KeyFrame takes 2 seconds. -->
                    <SplineSizeKeyFrame KeySpline="0.6,0.0 0.9,0.00" KeyTime="0:0:3" Value="300,300" />





Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2015 Microsoft