I am creating a Silverlight application that uses MVVM and MEF. In the main app.xml file of the project, I specified resource dictionaries:
<Application x:Class="RAP.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:app="clr-namespace:RAP" xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:Resources="clr-namespace:RAP.Assets.Resources" Startup="Application_Startup" UnhandledException="Application_UnhandledException"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Assets/StylesX.xaml"/> <ResourceDictionary Source="Assets/Styles.xaml"/> <ResourceDictionary> <app:ApplicationResources x:Key="ApplicationResources" /> <app:NotOperatorValueConverter x:Key="NotOperatorValueConverter" /> <app:IsNullConverter x:Key="IsNullConverter" /> <Resources:ResourceWrapper x:Key="ResourceWrapper" /> <telerikControls:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> <telerikControls:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/> </ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
In the main project, StaticResource references to elements in resource dictionaries are resolved correctly, but in subsequent projects whose xap is dynamically loaded, during development, StaticResource links are unresolved and cause problems with loading the xaml constructor. I thought that by specifying resource dictionaries in the main app.xml project, resource dictionaries would be available for all projects in the solution. Is there anything else I need to do to expose the resource dictionaries for the rest of the draft solutions?
source share