Rectangle
の色を黒から赤に変更するために使用される次の Windows Phone コードがあります。
<Grid x:Name="LayoutRoot">
<phone:Pivot x:Name="MyPivot" >
<phone:PivotItem x:Name="MyPivotItem">
<Canvas x:Name="MyCanvas">
<Canvas.Resources>
<Storyboard x:Name="MyStoryboard">
<ColorAnimationUsingKeyFrames
Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
AutoReverse="True">
<EasingColorKeyFrame KeyTime="00:00:0" Value="Black" />
<EasingColorKeyFrame KeyTime="00:00:0.5" Value="Red" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</Canvas.Resources>
</Canvas>
</phone:PivotItem>
</phone:Pivot>
</Grid>
私がやりたいEasingColorKeyFrame
のは、コード ビハインド ページから s で使用される色を変更できるように、これをより動的にすることです。の を分離コード ページのプロパティにValue
バインドすることはできますか?EasingColorKeyFrame