I don't seem to be able to access remote resources from an external assembly.
The following line in MainWindow.xaml isn't working, no background color is getting displayed:
<StackPanel Grid.Row="0" Background="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type res:DummyForSharingResources}, ResourceId=TestBg}}"></StackPanel>
I published a corresponding repository to GitHub containing my Visual Studio 2019 solution. It contains all the details.
What I did so far
- "Themes/generic.xaml" file created in supplemental assembly (
StylesAndResources
), filled with resources. ThemeInfoAttribute
updated in application assembly to referenceResourceDictionaryLocation.ExternalAssembly
.- Dummy class created in
StylesAndResources
in order to be able to have aComponentResourceKey
be generated.
What am I doing wrong?