事件触发器不起作用
我的 Windows Phone 7 Silverlight 应用程序中有一些触发器,例如
<Grid x:Name="ContentGrid" Grid.Row="1" Background="Red" Height="100">
<Grid.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:10" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
</Grid>
但当 Loaded 事件触发时,会发生 XamlParseException。 我用谷歌搜索了一下,但什么也没找到。
有想法找到解决方案吗? 谢谢。
I have some trigger in my Windows Phone 7 Silverlight app such as
<Grid x:Name="ContentGrid" Grid.Row="1" Background="Red" Height="100">
<Grid.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:10" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
</Grid>
But when Loaded event fires, XamlParseException occurs.
I googled a bit, but found nothing.
Any idea to find solution?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我稍微更改了您的代码:
查看下面的代码:
I changed your code a bit:
view the code below: