v2 Desktop RI - Designer chokes on all Views in VS2008

Topics: Prism v2 - WPF 3.5
Mar 6, 2009 at 8:46 PM
Every RI view that I've tried to open in VS2008 results in something like this:

StaticResource reference 'PopupTextBoxStyle' was not found.

These styles are actually defined in a file named Styles.xaml in the RI Shell project itself, but these Modules have no notion of such a project.  So, is the VS design-time experience of Modules dead with Composite WPF?  I couldn't find anything in the docs that explain this shortcoming.  Am I missing something?

Thanks,
Nate
Mar 6, 2009 at 11:43 PM
Hi Nate,

You are correct, the VS designer doesn't work, due to some design choices we took while developing the RI. But you will find that Expression Blend will still work.

In the approach we took, the RI is responsible for setting some styles that will ensure the application has an overall appearance of the application. Since the modules and the shell don't depend on each other, it make sense that you can't see the effect of the 'global' styles in your modules.

Unfortunately, the WPF editor of Visual Studio doesn't work very well if your modules depend on 'external' styles. Expression blend does a much better job at this.

If you want to have the design time experience for your modules in Vs.Net, i'm afraid the only option is to have all these styles present in the modules themselves.

Hope this helps,
_Erwin
Mar 7, 2009 at 12:07 PM
Thanks for the reply.  I sorta gathered this from the Guidance doc section "UI Design Guidance Overview" but was suprised that the VS failure wasn't called out specifically someplace.

Hopefully the VS2010 designer can catch up a bit and allow styles to be located from "arbitrary" places.

Nate

Mar 8, 2009 at 7:52 PM
Hello Nate!

An alternative solution would be to move the shared resources (e.g. Styles.xaml) into the StockTraderRI.Infrastructure assembly because this is referred by all modules. So the VS designer is able to show the UI with the correct styles.

Unfortunately, there is another issue that you might run into with this approach. See this link for further information: http://compositewpf.codeplex.com/WorkItem/View.aspx?WorkItemId=3504

Maybe you find this helpful
jbe