这是多余的(每个TextBlock
中的Mode=OneTime
)?在ItemsSource中设置绑定模式就足够了吗?
<ListBox ItemsSource="{Binding Path=SearchResultsItems, Mode=OneTime}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Price, Mode=OneTime}" />
<TextBlock Text="{Binding Path=Description, Mode=OneTime}" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>