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

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>           ...

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