July 2009 Entries

StringFormat annoyances in VS2008

I’ve been using StringFormat in my xaml quite a bit recently, and whilst I’ve liked it, I’ve found that code which is valid tends to cause VS2008 to no longer be able to represent the designer (which some might say is a good thing)… Basically, the following code: <TextBlock Text="{Binding MyValue, StringFormat=The value is {0}}"/> causes VS to basically say ‘no way’ and can no longer render the xaml. Pressing F5 shows the Window just fine… Soo… What can we do about it? If we modify the ‘StringFormat’ ......