You are developing a Windows Presentation Foundation (WPF) application. All of the application styles are in the file name Themes.dll
You have the followiing markup segment.
<Border Style=”{StaticResource BlueBackground}” Heigh=”100″ Width=”200″>
….
</Border>
BlueBackground is defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dll file.
You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackground style.
A.
Add the following line to Windows.Resources
<ResourceDictionary Source=”/Themes;component/BlueTheme.xaml”/>
B.
Add the following line to Windows.Resources
<ResourceDictionary Source=”pack://application:,,,/Themes;BlueTheme.xaml”/>
C.
Add the following line to Border.Resources
<ResourceDictionary Source=”/Themes;component/BlueTheme.xaml”/>
D.
Add the following line to Border.Resources
<ResourceDictionary Source=”pack://application:,,,/Themes;BlueTheme.xaml”/>
Explanation:
A or B
It’s B, as it clear reading MSDN – “Pack URIs in WPF” (http://msdn.microsoft.com/en-us/library/aa970069.aspx) and in particular the section “Local Assembly Resource File”
Cannot be B. Not a local resource (Themes.dll). Missing the component;