我有一个ListView约700条目(每个条目一个图像)。 ListView在垂直滚动模式下工作得很好。但是,当我将其更改为“水平”时,它会在OutOfMemory异常情况下在手机上崩溃。
我的代码改变滚动方向从微软:C#/ UWP OutOfMemory更改ListView到水平时
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
好像上帝Windows试图来一次加载完整列表时Orienation改变。任何人都会遇到这个问题,甚至可能提供解决方案?
你的ListView的内容是否有绑定?你有UWP应用程序吗? –