如何在不同布局的 Windows Phone 应用程序中实现列表框中的虚拟化 [英] How to attain virtualization in listbox with different layouts of Windows Phone App

查看:22
本文介绍了如何在不同布局的 Windows Phone 应用程序中实现列表框中的虚拟化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 WP7 应用中有一个包含不同用户控件的列表框.我应该如何使用 Virtualization Mode 作为虚拟化应用回收".因为当我应用时,结果并不顺利.滚动时似乎有一个混蛋.在 Android 中,对于相同的场景,用户控件将被标记为它们的回收被预先处理,因为它们是完全区分的,这里没有给出任何此类选项.

I have a List box with different user controls in WP7 app. How should I apply virtualization with Virtualization Mode as "recycling". Because when I applied the results are not smooth. There seem to be a jerk while scrolling. In Android, for the same scenario the User Controls will be tagged their recycling is handled preoperly since they are perfectly distinguished and here any such option is not given.

知道如何处理这种情况吗?

Any idea how to handle this scenario?

我标记了 silverlight 和 c#,因为 WP7 在添加任何此类属性时都有两面性.

I tagged silverlight and c# becuase WP7 has both sides when adding any such properties.

推荐答案

您看到的行为是由于列表中的项目具有不同的高度.这会导致列表不断需要重新测量内容,并且随着项目从列表中删除,滚动偏移量变得不正确,从而导致跳动.

The behaviour you see is due to the items in the list being of different heights. This causes the list to constantly need to remeasure the contents and the scroll offsets become incorrect as items are removed from the list, hence the jumpiness.

平滑滚动的最佳选择是使用相同高度的项目或不使用虚拟化.

Your best bet for smooth scrolling is to use items of the same height or not use virtualisation.

这篇关于如何在不同布局的 Windows Phone 应用程序中实现列表框中的虚拟化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆