What is Silverlight trying to tell you?

This is what I spent the last hour with:

When building your Silverlight project fails with the error message “Whitespace is not allowed after end of Markup Extension.”, you’ve got a blank (or more) behind a databinding expression, like here:

<Button Content="{StaticResource ResText_SaveButton} "/>

See the blank behind the curly brace? That one.

If however it tells you “Unexpected ATTRIBUTE in parse rule PropertyElement ::= . PROPERTYELEMENT Content? ENDTAG..” then you may have stuck an attribute to an element that does not expect one, as to marveled at here:

<my:DataList.EditSection DataContext="{Binding FormData}">
Advertisements
About

Christian is a software architect/developer. He lives in Germany, reads a lot, and likes cycling.

Tagged with: , ,
Posted in Coding
3 comments on “What is Silverlight trying to tell you?
  1. anonymous says:

    Thank you, you have saved me a lot of time. It just gave the error message and didn’t even tell me where the error was. It gave me a column number for the error (which was wrong anyone) but no row.

  2. Mike Gold says:

    Thank You! This also saved me a great deal of time. For some reason Visual Studio points to the wrong location for the error, but knowing this fact you posted, helped me stop spinning my wheels. Thanks!!!

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

%d bloggers like this: