0

I'm storing all localizable strings in a ResourceDictionary (in App.xaml) and assign those via the StaticResource markup extension to TextBlock.Text, Button.Content etc.

In Beta 2 and RC0, sometimes parsing the XAML in InitializeComponent() will fail with an AG_E_PARSER_BAD_PROPERTY_VALUE on the line and position where I set the attribute value to the StaticResource.

It only happens sometimes: When restarting the app, it parses and displays without any problems. The same interface code works for days or weeks, then it happens again.

Any ideas?

Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
Daniel Beck
  • 6,363
  • 3
  • 35
  • 42

2 Answers2

2

Parser, at least in beta 2, didnt like whitespace...

For instance:

Text="{StaticResource bleh}" 

worked

however this:

Text = "{StaticResource bleh}"

bombed

Brian Leahy
  • 34,677
  • 12
  • 45
  • 60
0

Basically it means bad xaml somewhere in the code you can see the Line number and Position and see something is wrong .. I got the same error in my xaml Once corrected everything seems working

  • Read the question to the end (by the way, this was two years ago in SL 2.0 Release Candidate): It only happened SOMETIMES. And definitely no bad XAML, I quadruple-checked everything. – Daniel Beck Oct 13 '10 at 20:12