How to get at ResourceDictionary style when it is loaded from external xap and assemblies are MEF-fe

Posted by user158503 on Stack Overflow See other posts from Stack Overflow or by user158503
Published on 2010-06-12T15:57:16Z Indexed on 2010/06/12 16:02 UTC
Read the original article Hit count: 224

I've got the following setup:

The main application loads a XAP with an IPlugin implementation. The Plugin contains a 'DisplayPanel' that contains a referenced Control with other controls. The DisplayPanel here is simply a container control to show referenced Control. This referenced Control, from an assembly, uses a Style from a ResourceDictionary xaml in this assembly. At least that's what I want to have. The problem is that the referenced Control throws an error: Cannot find a Resource with the Name/Key PlayerPanelGrad [Line: 1500 Position: 127] I've tried to get at the style by referencing the ResourceDictionary through a Merged Resource dictionary reference:

       <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="TableControls;component/ControlsStyle.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

But that doesn't work.

How would you approch this?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about assemblies