| Subject 1 |
WPF 執行順序 |
| Date |
September 18, 2008, 5:50 pm |
| Comment |
請問 xaml 檔有做一些開頭動畫,我該如何讓動畫跑完
在執行 LOADED 以下要做的動作
<Window (省略)
>
<Window.Resources>
<Storyboard x:Key="intro"></Storyboard>
</Window.Resources>
<Window.Triggers></Window.Triggers>
</Window>
如果我在 loaded 寫 msgbox("hello")
結果是先跑出 hello 這訊息,但動畫確一次出現
我想要先出現動畫,在出現 hello 這訊息
請問我該如何做
|
| Author reply |
在動畫上加上Completed事件即可
如:
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tadaphone" Storyboard.TargetProperty="(UIElement.Opacity)"
Completed="DoubleAnimationUsingKeyFrames_Completed">
在CODE 中
DoubleAnimationUsingKeyFrames_Completed
方法中寫上你要執行的動作msgbox("hello") |