What\'s the difference between the Window.Loaded and Window.ContentRendered events in WPF? Is the ContentRendered event called first?
This is not about the difference between Window.ContentRendered and Window.Loaded but about what how the Window.Loaded event can be used:
I use it to avoid splash screens in all applications which need a long time to come up.
// initializing my main window
public MyAppMainWindow()
{
InitializeComponent();
// Set the event
this.ContentRendered += MyAppMainWindow_ContentRendered;
}
private void MyAppMainWindow_ContentRendered(object sender, EventArgs e)
{
// ... comes up quick when the controls are loaded and rendered
// unset the event
this.ContentRendered -= MyAppMainWindow_ContentRendered;
// ... make the time comsuming init stuff here
}