I am making a small program in C# for Windows Phone. One thing that it should do is hide a toolbar of buttons whenever the user taps the "Hide" button.
I've finished the code to hide the toolbar. It hides the buttons, like expected. But what happens now is that all the buttons disappear at once. In order to make a sort of "animation", I've decided to wait .1 second until hiding all the buttons.
How would I wait .1 second?
Here's my code right now.
bool panelopened = false;
private void image1_MouseEnter(object sender, MouseEventArgs e)
{
if (panelopened == false)
{
ImageSourceConverter imgs = new ImageSourceConverter();
image1.SetValue(Image.SourceProperty, imgs.ConvertFromString("/Main%20View;component/Images/hide.png"));
image3.Width = 50;
image4.Width = 50;
image5.Width = 50;
panelopened = true;
}
else
{
ImageSourceConverter imgs = new ImageSourceConverter();
image1.SetValue(Image.SourceProperty, imgs.ConvertFromString("/Main%20View;component/Images/more.png"));
image3.Width = 0;
image4.Width = 0;
image5.Width = 0;
panelopened = false;
}
}