EDIT: Yes, dialogs aren't just a while loop in .NET. I was merely trying convey a simple explanation of why MessageBox.Show blocks like the question creator asked. I modified the below wording to better fit.
If you need to wait for a page to load completely you need add in some sort of trigger to determine when the page is finished. 
for (int i = 0; i < 10; i++)
{
     MessageBox.Show("i");
}
Could be written as:
for(int i = 0; i < 10; i++)
{
    bool isRunning = true;
    while(isRunning)
    {
       isRunning = CheckIfSomethingIsStillRunning();
       Thread.Sleep(10);
    }
}
Basically, you have to keep a loop going until you deem it necessary that you want your Thread/Program to continue.
The reason why MessageBox.Show() blocks is because Windows are really just running in a while loop constantly receiving messages and painting. When you show a Dialog (Window.ShowDialog(), MessageBox.Show()), there is now a method that continues to block waiting for the window to be closed.
I hope this helps.