none
Excel VSTO: Use ResourceDictionary which is in separate assembly RRS feed

  • Question

  • In my VSTO Application, I need to use the ResourceDictionary which is in separate assembly.

    I created a separate ResourceDictionary named generic.xaml in the VSTO application under themes folder like /themes/generic.xaml. In that file, I have referenced the ResourceDictionary from the external assembly using the Pack URIs.

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
       <ResourceDictionary.MergedDictionaries>
         <ResourceDictionary Source="pack://application:,,,/ExternalAssemblyName;component/Themes/resource.xaml"  />
       </ResourceDictionary.MergedDictionaries>
     </ResourceDictionary>

    Also changed AssemblyInfo to the following:

    [assembly: ThemeInfo(
    ResourceDictionaryLocation.None,
    ResourceDictionaryLocation.SourceAssembly)]

    But still found no luck. Any help would be good.



    Wednesday, May 16, 2018 8:43 AM

All replies

  • Hello Jayakrishnan,

    This forum is for development issue related to Visual Studio Tools for Office and I think your issue is more related to ResourceDictionary which is not a part of Visual Studio Tools for Office. 

    I would suggest you try to reproduce the issue on other type application, such as a windows form application or a console application. If it could work on other applications, the issue may be more related to VSTO. If it could not too, I think this issue is not related to VSTO.

    Please try to do such test and share us the result.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 17, 2018 9:25 AM