WP7列表框如何让用户订购项目 [英] WP7 ListBox how to allow user to order items
问题描述
方案:使用MVVM Windows Phone 7的应用程序。我有一个绑定到从我的视图模型项目集合的列表框。该视图的主要用途是允许用户重新排序项他的喜好。
Scenario: Windows Phone 7 application using MVVM. I have a ListBox that is bound to a collection of items from my ViewModel. The main usage of this view is to allow the user to re-order the items to his liking.
如何在WP7实现这个?我想这个问题的方法是简单地让用户拖动物品到他想要的位置。是否有这样的姿态任何内置的支持? (我一直没能找到任何)。
How do I implement this in WP7 ? The way I would like to do this would be to simply allow the user to drag items to the position he wants. Is there any built-in support for such a gesture ? (I haven't been able to find any).
推荐答案
您可以在您的项目包含的的Silverlight for Windows Phone支持工具包,然后使用 GestureListener
来听 DragStarted
, DragDelta code>和
DragComplete
事件。
You could include in your project the Silverlight for Windows Phone Toolkit and then use the GestureListener
to listen for DragStarted
, DragDelta
and DragComplete
events.
这篇关于WP7列表框如何让用户订购项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!