You are waiting on UI thread which won't let refresh your UI
until you exit from method.
I strongly suggest to move your long running process on to seperate thread
and wait on it and once done, marshall you call back to UI thread via Dispatcher.
However, you can use workaround by simply queuing an empty delegate on UI dispatcher with priority set to render so that your UI gets refresh -
while(stackpanel.Children.Count != 0)
{
Grid grid = stackpanel.Children[0] as Grid;
// start process 1 and WaitForExit()
stackpanel.Remove(grid);
Dispatcher.Invoke((Action)(() => { }), DispatcherPriority.Render);
// start process 2 and WaitForExit()
}
Refer to my answer over here for details.