Silverlight: Why can't silverlight see my xaml file referenced in MergedDictionary?

Posted by Sergio on Stack Overflow See other posts from Stack Overflow or by Sergio
Published on 2010-03-19T15:20:12Z Indexed on 2010/03/19 15:21 UTC
Read the original article Hit count: 568

Filed under:

Hi there,

I have a silverlight application with a number of styles defined in a seperate xaml file under the directory /Styles. My App.xaml looks like this:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Styles/Legend.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Legend.xaml has its build action set to Content and 'Do Not Copy' as the copy to output directory setting.

The message I'm getting in blend is:

An error occurred while finding the resource dictionary "/Styles/Legend.xaml"

Thanks in advance!

© Stack Overflow or respective owner

Related posts about Silverlight