Style "X" is not found design time problem

Oct 7, 2008 at 4:56 PM
Edited Oct 7, 2008 at 5:01 PM
I don't know if there is an elegant solution to this scenario and wanted to get some thoughts.

In my App.xaml I have a reference to all my resource dictionaries. (Example: LabelStyles.xaml)

In LabelStyles.xaml there is a style:
<Style x:Key="SectionTitle" TargetType="Label">
    <Setter Property...etc...>

I have a UserControl as one of my views which contains a label using this style.

Label Style="{StaticResource SectionTitle}" Content="Some Title" />

The Problem
Because composite wpf loads these "views" into regions dynamically at run time, once the application runs, the view is able to find the style and apply it appropriately.

However, during design time, I get the squiggly marks under "SectionTitle" and with the error that the "Style SectionTitle is not found".

Besides putting a reference on every single view, is there any other way to gain back the design time recognition of these styles?


Dec 9, 2008 at 6:32 PM
Bumping this... Anyone know the best way to handel this?
Dec 23, 2008 at 5:51 PM
I have written some lines about this issue. You might find it interesting: Best Practices: How to handle shared resources in a modular application?