这是我的 XAML 代码,
<Grid>
<Grid.Resources>
<Storyboard x:Name="myStoryboard">
<DoubleAnimation x:Name="myDoubleAnimation" Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:0.2" AutoReverse="True"/>
</Storyboard>
</Grid.Resources>
<Grid x:Name="op_food" PointerEntered="op_PointerEntered">
<TextBlock Text="Food"/>
</Grid>
<Grid x:Name="op_cineplex" PointerEntered="op_PointerEntered">
<TextBlock Text="Cineplex"/>
</Grid>
</Grid>
和 C# 函数,
private void op_PointerEntered(object sender, PointerRoutedEventArgs e)
{
myStoryboard.Stop();
Grid myGrid = (Grid)sender;
myDoubleAnimation.SetValue(Storyboard.TargetProperty,myGrid.Name);
myStoryboard.Begin();
}
现在这是我执行此任务所遵循的链接,并且智能感知无法找到情节提要 - > http://blogs.msdn.com/b/silverlight_sdk/archive/2008/03/26/target-multiple-objects-properties -with-one-animation-silverlight.aspx
那么我在这段代码中哪里错了???