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.
Just a simple animation like fading from left to right. What codes should I add on my myButton?
If you want to do something right there in your codebehind, you could try something like this.
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.