XAML resources aren't loaded when calling from different project

Posted by svick on Stack Overflow See other posts from Stack Overflow or by svick
Published on 2010-05-19T00:06:09Z Indexed on 2010/05/19 0:10 UTC
Read the original article Hit count: 212

Filed under:
|
|

I have a WPF project with some styles in XAML in Application.Resources. This works perfectly fine. But when I open a window from this project from another one (this one is a console application), the resources from XAML aren't loaded. When I first tried it, I got a XamlParseException on StaticResource calls in XAML, so I changed it to DynamicResource and now the style just doesn't get loaded. How do I fix this?

The code I use:

[STAThread]
static void Main()
{
    App app = new App();
    MyWindow wnd = new MyWindow ();
    wnd.Show();
    app.Run();
}

© Stack Overflow or respective owner

Related posts about xaml

Related posts about wpf