サンプルデータを含むリストボックスにdatatemplatateを追加しようとしていますが、dataTemplateのlistboxitemには影響がないようです。使用されるコードは次のとおりです-
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Grid.Resources>
<DataTemplate x:Key="test1">
<TextBlock Background="Red">
</TextBlock>
</DataTemplate>
</Grid.Resources>
<ListBox ItemTemplate="{StaticResource test1}">
<ListBoxItem>A</ListBoxItem>
<ListBoxItem>B</ListBoxItem>
<ListBoxItem>C</ListBoxItem>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ></StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</Grid>
</Page>
listboxitem の背景が赤くなりません。itemcontainerstyle を使用して同様のことを達成できることはわかっていますが、ここで datatemplate が適用されない理由を知りたいです。