<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.Loaded">
<BeginStoryboard>
<Storyboard>
<ColorAnimation To="Red" Duration="00:00:01" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Background"></ColorAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
上面代码中界面加载完毕就执行动画了,RoutedEvent貌似不支持其他事件额,要是我想点击的时候才执行动画用上面那种方式要怎么做?
------解决方案--------------------------------------------------------
type.eventName
RoutedEvent 类