如何加載列表框中的所有項目而不是僅顯示那些項目?基本上,你如何關閉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