views:

474

answers:

1

Hi I am trying to create a reusable XAML Window in a DLL.

I have placed in the Themes folder a new ResourceDictionary (I even merged it in the Generic.xaml), but when I try to use its styles in the window, I get an error message that the style doesn't exist:

<Window Style="{StaticResource ModalWindowStyle}" >
    <!-- I have also the following -->
    <Window.Resources>    
        <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}" />
    </Window.Resources>
</Window>

I get an exception that this styles don't exist, they are both declared in that ResourceDictionary which is in the Themes folder.

A: 

See this post.