這是多餘的(每個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>