c# - Visual Studio 2015 XAML Resource Dictionary Error -


part 1 (solved)

the following xaml works fine in visual studio 2013 (premium, update 5):

<window.resources>   <resourcedictionary source="resources/dictionaries/main.xaml" /> </window.resources> 

however, when working same project in visual studio 2015 (enterprise), complains following error:

exception: error occurred while finding resource dictionary "resources/dictionaries/main.xaml".

a different topic concerns similar error visual studio 2012, , apparently resolved installing update 1 vs2012.

part 2

using pack uri makes visual studio 2015 happy, unfortunately still not applying inhertied styles. interestingly, in visual studio 2013 designer style applied correctly, not in visual studio 2015, , not when application runs!

any ideas?

part 2 : update

a further (side issue), confusing main issue "static resources main window loaded after main window definition processed". means default styles (in specific, window style) must placed in app.xaml defined time main window loaded (otherwise not applied in designer, or in application when runs).

try following:

<resourcedictionary source="pack://application:,,,/yournamespace;component/resources/dictionaries/main.xaml" /> 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -