Wednesday, December 10, 2008

Beware the Constructor!

If you find yourself getting the dreaded Loading Error on a WPF page the first place you should look is the constructor of the control is trying to load.

I had a problem for two day which was finally resolved by moving this line:

ListBoxMessages.ItemsSource = Helper.Messages;

From the UserControl constructor to the Loaded event handler.

No comments:

Post a Comment