Always double-check your XAML code

A link to a Converter defined in the Resource of an user control like this:


<project:BrokenConverter x:Key=”brokenConverter”/>


and it should be referenced by using

Foreground=”{Binding Broken,Converter={StaticResource brokenConverter}}”

Last night, while experimenting with some code in a hurry, I missed “StaticReference” and my code looked like this:

Foreground=”{Binding Broken,Converter=brokenConverter}”

The results are beyond imagination:

  • VS didn’t complained about the Converter reference
  • The SL application started
  • The browser stopped responding while using around 1 GB RAM πŸ˜€
  • VS stopped responding
  • Windows stopped responding πŸ˜€

After 5 minutes I decided to physically restart the machine in order to use it again πŸ˜€

I can say I learned something today: Always double-check your XAML code!

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.