Sadly, not a single question about this issue on stackoverflow. Well at least, none that I bumped into while searching.
Anyway, when the program I’ll be talking about is build. the first window that appears is the login. When the user enters correct login information the main window is shown. However, on the main window there are bunch of information that is collected from the internet.
This causes the main window to stay transparent, as shown in picture [1] below, for some reasonable time. The information collected from the internet is consisting of some xml as well as data from a MySQL db.
I have a Window_Loaded event that looks like;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
method1();
method2(1);
method3();
.
.
.
//method6();
}
So, obviously when I cancel out certain methods and leave this event with fewer then the time, window stays transparent before going into it’s normal state, gets smaller.

However, what I want to do is to have the window load normally and then maybe have loading indicators for informing the user that the content is being loaded.
p.s I am using mahapps.metro controls.
Thank you in advance
This happens because you’re running blocking code on the UI thread, so the window doesn’t have a chance to repaint.
You need to do all of that in a background thread.