views:

25

answers:

2

If answer is Yes. How can I select from that use in Application use? If No. Can you please explain me the reason?

Please reply ASAP.

Thanks in Advances Bhushan Deshmukh

A: 

You can have multiple Applications inside a Silverlight project, you just select the one you want inside the Project Property sheet under Startup object.

Peter Kiers
I have only one application !!!
Bhushan Deshmukh
Yeah but in that one application you can have for example App1.xaml and App2.xaml, and choose in Project Properties which app you like to use as startup.
Peter Kiers
+1  A: 

To naively answer the question you've appear to have asked; the answer is no you can't. Ultimately the application manifest must specify a single assembly and type that is derives from Application.

However here is my guess at what you really want to achieve. You don't want to have to define all the application resources in a single App.xaml file.

You can divide up resources into separate resource dictionary files. Use the "Add New Item..." on the project and select the "Silverlight Resource Dictionary". Create two or more of these and divide up the resources currently in App.xaml into these new files in a logical fashion. For sake of example lets say you have a "Colors.xaml" and a "CommonStyles.xaml".

Now you use the MergedDictionaries property to list these resource dictionaries to aggregate them into your App.Xaml. Ideally your App.xaml just ends up looking like this:-

<Application.Resources>
  <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="Colors.xaml" />
      <ResourceDictionary Source="CommonStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
</Application.Resources>
AnthonyWJones