I got following Source
<UserControl.Resources>
<DataTemplate x:Key="ItemTemplate">
<ListBox ItemsSource="{Binding Inventory}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ItemTemplate="{StaticResource ItemChildTemplate}"
ItemContainerStyle="{StaticResource ListBoxChildItemStyle}"
BorderThickness="0">
</ListBox>
</DataTemplate>
<DataTemplate x:Key="ItemChildTemplate"> ... </DataTemplate>
<Style x:Key="ListBoxChildItemStyle" TargetType="{x:Type ListBoxItem}">...</Style>
</UserControl.Resources>
I get:
The resource ListBoxChildItemStyle could not be resolved.
The resource ItemChildTemplate could not be resolved.
I don’t see the problem at all. Expression Blend also has no suggestions.
Resources need to be declared before being referenced statically. Swap the order of your resources so that you never reference one that appears later in your file.