Windows 8的应用程序地铁 - 动画堆栈面板? [英] Windows 8 metro app - animating a stack panel?
问题描述
我在做一个按钮即会消失我的堆叠面板:
I'm making a button that will disappear my stack panel:
public void myButton (object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
myStackPanel.Visibility = Visibility.Collapsed;
}
不过,我也想执行一个小动画,当摆脱了堆面板的。
However, I would also like to perform a little animation when getting rid of that stack panel.
只是一个简单的动画像从左至右褪色。我要补充什么codeS我myButton的?
Just a simple animation like fading from left to right. What codes should I add on my myButton?
推荐答案
您可以使用 FadeOutThemeAnimation ,如下所述:<一href=\"http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.media.animation.fadeoutthemeanimation.aspx\" rel=\"nofollow\">http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.media.animation.fadeoutthemeanimation.aspx.
You can use a FadeOutThemeAnimation, as described here: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.media.animation.fadeoutthemeanimation.aspx.
这篇关于Windows 8的应用程序地铁 - 动画堆栈面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!