1
我對WPF很陌生,嘗試使用情節串連圖板的某些內容,我想要的是在第一次看到情節串連圖板時開始。它是在一個嚮導的工序不是在負載可見)帶有圖像的WPF情節串連圖板,當它可見時啓動棋盤
<Grid Name="GridLoading" Visibility="Hidden" >
<Image>
<Image.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard >
<Storyboard Name="LoadingStoryBoard" Completed="LoadingStoryBoard_Completed">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source"
Duration="0:0:4">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2a-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:1">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2b-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:2">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2c-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:3">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\...\2d-loading.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Grid>
任何指針不勝感激
謝謝!我現在唯一需要弄清楚的是在動畫完成時執行一些代碼,因爲如果Completed =「LoadingStoryBoard_Completed」在樣式元素中,它似乎是無效的 –