By dsandor at April 05, 2010 03:50
Filed Under:
Attribute /SLApplication;component/Style/XamOutlookBar.xaml value is out of range. [Line: 17 Position: 44]
The given key was not present in the dictionary.
So I played around with this error for a while. I have not fired up a new Silverlight 3 project since Visual Studio 2010 RC came out. In beta 2 things were different.
In Visual Studio 2010 RC you have to provide the fully qualified class path in the Resource Disctionary’s source attribute.
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/SLApplication;component/Style/XamOutlookBar.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
My solution was to include the fully qualified class path and this solved my problem.
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/MyApp.Admin.SLApplication;component/Style/XamOutlookBar.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
In my code block above the MyApp.Admin.SLApplication is the FQCP for the Silverlight application class.
63427426-9775-4fa6-bac7-55074f8a24de|1|5.0
Tags: