• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 877
  • Last Modified:

Multiple App.xaml in Solution

Hi,
let's say I have a silverlight solution with three projects in it. First two are silverlight projects (application and web page for testing), and the third one is the project I added to be separated from the first two. When I define style and put it into App.xaml everything works just fine. My goal is to add another App.xaml (Silverlight Application Class) to the new project I created so I can have it all in one (classes and styles) project separated from the main silverlight projects (first two). I did it but it doesn't work, style is not applied and NewApp.Current.Resources.Count is zero even though i put style in it. If i put it back and adjust all headers to work, everything is fine again. What is my mistake?
0
zstapic
Asked:
zstapic
1 Solution
 
unmeshdaveCommented:
instead of creating another app.xaml, you can use <resourcedictionary> in your a seperate xaml. your all styles will come between
<resourcedictionary> and </resourcedictionary> tags. and these will be root tags in your xaml.
and whereever you want to use it, you can merge this resourcedictionary.
http://msdn.microsoft.com/en-us/library/system.windows.resourcedictionary.mergeddictionaries.aspx 
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now