If I use the following in XAML I get an error:
<Style TargetType="TreeViewItem">
<Style.Triggers>
<DataTrigger Binding="{Binding Selected}" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightColor}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
The error is:
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='#FF316AC5'