Property Paths
Rather than showing only DoubleAnimation
, the following example uses ColorAnimation
to repeatedly animate the middle Color
of a three-stop gradient from white to black and back again:
<Page ...> <Page.Resources> <Storyboard x:Name="gradientStoryboard" TargetName ="stop" TargetProperty ="Color"> <ColorAnimation From="White" To="Black" Duration="0:0:2" AutoReverse="True" RepeatBehavior="Forever" EnableDependentAnimation="True"/> </Storyboard> </Page.Resources> <Canvas Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Rectangle Width="200" Height="200"> <Rectangle.Fill> <LinearGradientBrush ...
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.