Keep ResourcesDictionary on WPF MVVM

If you initialize your viewmodels inside the App Constructor, the resourcesdictionaries with all the resources are missing. In order to keep them, after trying and trying, you must initialize the viewmodel in:

protected override void OnStartup(StartupEventArgs e)
MainVM = new MainViewModel();

And that’s all, you can keep your application the most pure MVVM. Read my previous MVVM tagged articles to learn how to.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s