0
我只想開始一個故事板,當用戶用鼠標左鍵按下時,該故事板將使矩形可見2秒。但我無法解決如何獲得知名度的價值。使用觸發器設置可見性
<Grid.Triggers>
<EventTrigger RoutedEvent="MouseDown" >
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Duration="0:0:2" Storyboard.TargetName="RectFront" Storyboard.TargetProperty="Visibility">
<LinearDoubleKeyFrame KeyTime="0:0:0.100" Value="1" />
<LinearDoubleKeyFrame KeyTime="0:0:2" Value="0" /> <--- HOW to change this into Visibility Type?
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Grid.Triggers>
感謝H.B爲您的快速回答。使用objectKeyFrames,它也可以像使用示例一樣使用靜態方法。大 – Nasenbaer