Sharing resources with Addins

Feb 4, 2008 at 5:24 PM
I have an application that will be using AppDomain isolated add-ins. We would like these addins to use our defined styles. Do you have any ideas on how that can be accomplished?
Feb 19, 2008 at 10:58 PM
I am not sure if this will benefit you. But what you can do is have a separate project for all your style files (xaml files). Then, from your addins, you can reference all these styles...

For example:

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Part.Styles;component/Resources/ApplicationStyles.xaml" />
<ResourceDictionary Source="/Part.Styles;component/Resources/SearchMessagesStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

the assembly is Part.Styles and the path in the project is component/Resources/SearchMessagesStyles.xaml , SearchMessagesStyles is style resource name...

I am using this method to load styles across multiple projects with different addins.... You can just add your xaml styles to your style project and reference them from anywhere...

Cheers,

rita