I'm not sure what you are trying to do as your question was rather vague, but I can shed some light on how resources can be managed on the Silverlight platform.
Silverlight resources can be embeded within any XAML as all visual elements have a ResourceDictionary which is accessible via the Resources property.
<Grid>
<Grid.Resources>
<DataTemplate x:Key="MyTemplate">
</DataTemplate>
</Grid.Resources>
</Grid>
However, it is best practice to use special XAML files called "Resource Dictionaries".
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<DataTemplate x:Key="MyTemplate">
</DataTemplate>
</ResourceDictionary>
Silverlight 3, brings the ability to automatically merge these resource dictionaries into the application's main resource dictionary.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/A.xaml"/>
<ResourceDictionary Source="Resources/B.xaml"/>
<ResourceDictionary Source="Resources/C.xaml"/>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<Application.Resources>
In order to merge a resource dictionary with your Application's resources, the resource dictionaries must reside within the compressed XAP package that is used to deploy Silverlight applications down to the client.
However, if you wanted to, you could store the XAML resource dicationaries on the web server and bring them into your Silverlight application by using WebClient to download the file, then using XamlReader to construct the object model in memory from the XAML string you retrieve from the file.
Resource dictionaries are inherently strongly typed but not type-safe. In that, you will not get a compile time error if you have an improperly typed element in XAML. If there happens to be an error in one of your resources you will find out only when a reference to it is initialized and the rendering engine attempts to instantiate your resource.
So in short:
- Yes.
- Yes.
- Yes.
- No.