views:

117

answers:

2

In my application I have various styles and templates that are used in several classes. I've defined these in my so they are visible from all child objects.

However during design-time the WPF designer can't see these resources, complains they were 'not found' and demands the errors must be fixed before reloading the designer.

Is there something I can do to get it to look up the object hierarchy, or to point it specifically at the file that defines them?

A: 

You can get it to stop complaining by referencing them as a DyanmicResource instead of StaticResource

Micah
DynamicResource and StaticResource behave differently, so just replacing StaticResource so that the designer doesn't complain won't really fix anything. Also, I think one could too easily forget to undo the change and have a bit of a performance hit when WPF listens for changes to all resources.
Ryan Riley
A: 

You'll have to use Expression Blend to get your styles and templates to behave as you would expect them to behave. Unfortunately, Microsoft appears to have forsaken Visual Studio's WPF designer for all except the simplest of cases. They seem to have gotten serious about the separation of design and devleopment, at least to a degree.

Ryan Riley