Provide value on ‘System.Windows.Baml2006.TypeConverterMarkupExtension’ error

Sometimes it blows me away to see an error message that is so confusing that I don’t wonder why people get frustrated with new technology. Take for instance this error you might see when building a WPF application. I had a WPF application that I was polishing and happened to add a background to a report page. It took me several minutes to determine what the problem was because, as you can see, the error didn’t really indicate clearly what the problem was.
The root cause was that when I added the Grid.Background, I had not provided a path and the file was in the solution directory, so it looked fine during design but failed when I tried to run the application.
The fix was simple, I put the file on a hosted share and gave a web URL for the image.

I hope that helps someone avoid the headache I had.

** One additional note ** Changing the target framework to 3.5 clarified the error greatly. Kudos to the 3.5 .Net guys. ***

Happy Coding!

Advertisements

About JohnMarkHowell

I am a professional software developer with over 20 years of experience. I currently specialize in Microsoft technologies such as VS, TFS, C#, VB.Net, WCF, WPF, WW, etc.
This entry was posted in Uncategorized and tagged , , , , , , , , , . Bookmark the permalink.

One Response to Provide value on ‘System.Windows.Baml2006.TypeConverterMarkupExtension’ error

  1. Another comment. If you do want to use an image and keep it in your solution folder and then just reference it from wherever the application is, simply use “./” for the path on your ImageSource attribute. Example:

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s