I created the following resource dictionary, but the reference to ItemFontStyle throws a reference error ("StaticResource reference 'ItemFontStyle' was not found") in the HierarchicalDataTemplate. Any suggestions?

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<Style x:Key="ItemFontStyle">
<Setter Property="Control.Foreground" Value="Black" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Discontinued}" Value="True">
<Setter Property="Control.Foreground" Value="Gray" />
<Setter Property="Control.FontStyle" Value="Italic" />
</DataTrigger>
</Style.Triggers>
</Style>

<HierarchicalDataTemplate x:Key="ItemTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=name}" Padding="2" Width="200"
Style="{StaticResource ItemFontStyle}" />
<TextBlock Grid.Column="1" Text="{Binding Path=UnitsInStock}" Padding="2"
Style="{StaticResource ItemFontStyle}" />
</Grid>
</HierarchicalDataTemplate>

</ResourceDictionary>