Flexibility with From and To

The following Page adds a ScaleTransform to the Button and applies two Storyboards to animate it: one triggered by PointerEntered, and one triggered by the PointerExited family of events:

<Page ...>   <Page.Resources>     <!-- Two Storyboards, one for growing and one for shrinking -->     <Storyboard x:Name="growStoryboard" TargetName ="t" TargetProperty="ScaleX">       <DoubleAnimation From="1" To="1.4"/>     </Storyboard>     <Storyboard x:Name="shrinkStoryboard" TargetName ="t" TargetProperty="ScaleX">       <DoubleAnimation From="1.4" To="1"/>     </Storyboard>   </Page.Resources>   <Canvas Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">     <Button Content="Animating ...

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.