4
votes

I'm working on a custom control for Silverlight 4 in VS2010 and Expression Blend 4. Early on I was using generic.xaml with no problems and was actually able to see a preview of the styles I was playing with inside Blend.

But as I added complexity I suddenly started getting this error whenever I open generic.xaml in Blend and so far I've been unable to find the culprit...

alt text

Strangely, the project still builds and the styles work as expected. So I can in fact make design changes by changing generic.xaml and rebuilding. But I'd hope to fix this problem so I can make modifications within Blend more easily. Any ideas?

1

1 Answers

3
votes

Well, sorry about this. I've spent several hours experimenting and researching and thought I was in need of some help.

It's one thing to get a vague error message. It's really frustrating when you realize that you're doing things to fix the problem, but the message wasn't updating in Blend even after a rebuild! After I closed and re-opened Blend it was then responding to my changes. If someone else runs into this problem maybe it will help to know that restarting Blend is necessary.

So anyway, this particular error was caused by a readonly property which really shouldn't have been readonly. After that I had another problem inside my overridden OnApplyTemplate function. Now everything's working as it should.