Hi All,

I use the following code;

Code:
        private void StoryBoardCompleted(object sender, EventArgs e)
        {
            board.Stop(this);
            board.Remove(this);
            IsCompleted = true;
        }
in

Code:
            .
            .
            .
            Sound.Play();
            board = (Storyboard)TryFindResource("Storyboard1");
            board.Completed += new EventHandler(StoryBoardCompleted);
            board.Begin(this, true);
            while (IsCompleted != true)
                ;
            this.Hide();
            .
            .
            .
I want the above code to wait until the storyboard is finished
I use the while statement to wait.
But the program hangs on the while statement

Any Help?

Regards,

Ger