我是使用 WPF 故事板的新手,这是我的代码:
<StackPanel>
<Border Grid.Row="0" Background="Black" Height="40" Name="Border1"></Border>
<Grid Height="0" Name="MyGrid" Background="Green">
<Grid.Triggers>
<EventTrigger RoutedEvent="UserControl.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MyGrid"
Storyboard.TargetProperty="Height" From="0" To="40"
Duration="0:0:1" BeginTime="0:0:0"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
</Grid>
</StackPanel>
我想将触发情节提要开始的事件更改为 Border1.MouseEnter。
这可能吗?
谢谢