O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storyboards with Multiple Animations

As mentioned when Storyboards were introduced, they can contain one or more animations. Here’s an update to the Button-scaling XAML that scales it in both directions simultaneously (and omits the From values to avoid the “jump” effect):

<Page ...>  <Page.Resources>    <!-- Two Storyboards, one for growing and one for shrinking -->    <Storyboard x:Name="growStoryboard" TargetName="t">      <DoubleAnimation To="1.4" Storyboard.TargetProperty="ScaleX" />      <DoubleAnimation To="1.4" Storyboard.TargetProperty="ScaleY" />    </Storyboard>    <Storyboard x:Name="shrinkStoryboard" TargetName="t">      <DoubleAnimation To="1" Storyboard.TargetProperty="ScaleX" />      <DoubleAnimation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required