Storyboards with Multiple Animations
As mentioned when Storyboard
s were introduced, they can contain one or more animations. Here’s an update to the Button
-scaling XAML that scales it in both direction 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 ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.