我在这个XAML文件中一直收到一个错误:
属性“VisualTree”被设置了不止一次。
<ListBox x:Name="lstHistory" HorizontalAlignment="Left" Margin="12,284,0,90" Width="460"
ItemsSource="{Binding
Source={StaticResource SongCollection},
Path=DataCollection}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Margin="5" VerticalAlignment="top" Source="{Binding Path=Image}" />
</StackPanel>
<TextBlock Margin="8" Width="250"
TextWrapping="Wrap"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Text="{Binding Path=Name}" />
<TextBlock Width="100"
Margin="8,0,8,8"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Text="{Binding Path=Artist}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
有谁能帮忙吗?