如何加载列表框中的所有项目而不是仅显示那些项目?基本上,你如何关闭Listbox的虚拟化?我尝试过但没有任何工作。如何加载列表框中的所有项目而不仅仅是目视列表
<ListBox x:Name="listBox1" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Background="Black" BorderThickness="0" IsEnabled="False" ForceCursor="True">
<ListBox.RenderTransform>
<TranslateTransform x:Name="listBoxTransform" />
</ListBox.RenderTransform>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel x:Name="wp" IsItemsHost="True" ItemHeight="244" ItemWidth="184" Width="1700">
</WrapPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type Image}" x:Name="dtName">
<!-- The Image binding -->
<Image Width="170" Height="230" Source="{Binding}" Stretch="Fill" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
你确实有VirtualizingStackPanel.IsVirtualizing =“False”?你怎么知道他们没有加载?尝试取出RenderTransform。可能你的渲染滞后不是负载滞后。 – Paparazzi