c# - Visual Studio 2012 XAML designer does not show correct content when App.xaml in different assembly -
i'm moving wpf application vs 2010 vs 2012.
i have main executable contains app.xaml , separate class library wpf stuff. in vs2012 (sp3) xaml designer not show styles in mergedresourcedictionary defined in app.xaml, vs 2010 does...
for testing purposes moved app.xaml class library. after vs 2012 designer showed correctly.
since class libraries cannot contain app.xaml not solution.
any ideas?
my app.xaml looks following:
<application x:class="myapplication.app" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" startup="appstartup"> <application.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary source="pack://application:,,,/otherassemblyname;component/resources/resource1.xaml" /> <resourcedictionary source="pack://application:,,,/otherassemblyname;component/resources/resource2.xaml" /> </resourcedictionary.mergeddictionaries> </resourcedictionary> </application.resources>
know old question, answering may face similar in future.
the safest way accomplish create new resourcedictionary file, , add mergedresourcedictionaries in it.
then reference resourcedictionary in user control/pages/windows - of them, since
<usercontrol.resources> <resourcedictionary source="globalresources.xaml" /> <usercontrol.resources>
Comments
Post a Comment