我想在鼠标进入时使网格不透明。所以我尝试捕捉 MouseEnter 事件并为 Opactity 属性设置动画
<Grid Opacity="0.1" Name="myGrid" >
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.MouseEnter" >
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="0.1" To="1" Duration="00:00:01" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="myGrid"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
</Grid>
但 InitializeComponent 认为 Grid.MouseEnter 属性超出范围。我做错了什么?