MainWindow_Loaded isn't triggered on my WPF Application

Make sure the Loaded event mapped to MainWindow_Loaded in the XAML for MainWindow.

Edit: Moving my comment below into the answer, as it seems to be more helpful:

open up MainWindow.xaml (not MainWindow.xaml.cs), click on the window (make sure you don't have one of the controls selected), open the properties box (i believe F4 will do that), click on the events tab in the properties box, find Loaded and make sure that is mapped to MainWindow_Loaded (if it is blank you should be able to select your already existing one)


If you want to do this programatically you can use:

public MainWindow()
{
    Loaded += MainWindow_Loaded
    InitializeComponent();
}

You're probably missing actual subscribtion to Loaded event, you can fix that in two ways:

XAML:

<Window ... Loaded="MainWindow_Loaded">

Code behind, eg. in constructor:

public MainWindow()
{
    InitializeComponent();
    Loaded += MainWindow_Loaded;
}