I have a small program that has a converter for the background color of an item based on a boolean value. I also have a Style Sheet to cover a lot of the basic formatting. I have both of these working independently, but when I try to out them together as in:
UserControl.Resources>
<converter:RawMaterialHighlight x:Key="RawMat"></converter:RawMaterialHighlight>
<ResourceDictionary Source="../Styles.xaml"></ResourceDictionary>
</UserControl.Resources>
I get an 2 errors:
Each dictionary entry must have an associated key.
All objects added to an IDictionary must have a Key attribute or some other type of key associated with them. Line 13 Position 10.
When I add x:Key"Dictionary" to the dictionary line, it says that it cannot resolve the dictionary resource
<TextBlock Text="Material Type" Style="{StaticResource ResourceKey=TextBlockSectionHeader}"></TextBlock>
The resource "TextBlockSectionHeader" could not be resolved.
if I add Dict.TextBlockSectionHeader I get the same 'could not be resolved' error. I am assuming that I am declaring it incorrectly in the Resources section, I have so far been unable to find the solution though.