We have subclassed the Silverlight Application class to add some additional functionality and then use this in multiple projects. The problem is that the Resources defined in App.xaml do not seem to get loaded. Has anyone else seen this and/or have some insight? Here are the contents of App.xaml (note: the application starts and runs fine but then chokes开发者_开发技巧 when it looks for a Resource)
<myNS:ApplicationBase
xmlns:myNS="clr-namespace:Corp.XYZ.Infrastructure.Silverlight.Core;assembly=Corp.XYZ.Infrastructure.Silverlight.Core"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Corp.XYZ.BMW.App"
>
<myNS:ApplicationBase.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/AlternateControlStyles/StandardExpander.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</myNS:ApplicationBase.Resources>
What is the build action for StandardExpander.xaml? It should be Page (the default when you add a resourcedictionary).
Got it..... was not doing an InitializeComponent() in derived constructor...duh :)
精彩评论