8
A
回答
7
您需要使用故事板。將動畫添加到故事板並讓故事板開始動畫。
var storyboard = new Storyboard();
var opacityAnimation = new DoubleAnimation {
From = 0,
To = 1,
Duration = DurationHelper.FromTimeSpan(TimeSpan.FromSeconds(1)),
};
storyboard.Children.Add(opacityAnimation);
Storyboard.SetTargetProperty(opacityAnimation, "Opacity");
Storyboard.SetTarget(storyboard, myObject);
storyboard.Begin();
相關問題
- 1. UIView beginanimation does not working
- 2. Windows 8和Windows Phone 8
- 3. Windows 8中的Windows Phone 8
- 4. 在Windows 8 Base64String 8
- 5. 與Windows 8 singalR 8
- 6. WPF中的動畫序列與BeginAnimation
- 7. Windows RT與Windows 8
- 8. Windows Phone 8和Windows 8平板電腦
- 9. Windows 8或Windows 8專業版
- 10. Windows 8 - Windows 8中的Android Shared Shared?
- 11. Windows 8上的WP7 SDK 8
- 12. 在Windows 8位置8
- 13. Windows 8上的DLL LoadCount 8
- 14. Windows Phone 8
- 15. Windows 8主題
- 16. Windows 8 WebView
- 17. Windows Phone的8
- 18. Jmyron和Windows 8
- 19. 在Windows 8
- 20. Windows 8 WinJS Sqlite
- 21. Windows Phone 8 ScrollViewer
- 22. 在Windows 8
- 23. Windows 8 cmd cognos
- 24. 在Windows 8
- 25. 在Windows 8 CMD
- 26. Webview cookie Windows 8
- 27. MediaPlaybackControls Windows Phone 8
- 28. 的Windows 8 WPF
- 29. Windows 8錯誤
- 30. Windows Phone 8 TextBlock
請發佈您的代碼,以便我們能夠看到您是如何實例化myObject的 – MethodMan 2011-12-25 19:13:31
這與什麼對象無關。即使Button myButton = new Button()也沒有BeginAnimation方法。我不確定這是改變了還是我的裝置壞了... – 2011-12-25 19:15:46
@HarisHasan那麼有沒有其他的選擇?我還可以如何使用我的DoubleAnimation? – 2011-12-25 19:24:41