拖放列表框项目
在我的应用程序中,我的同一视图中有两个列表框。是否可以拖动一个列表框项目并将该项目放置在另一列表框上。我看到了 iPhone 中的功能。我可以在我的应用程序中实现同样的目标吗?如果答案是肯定的,我如何在 WP7 中实现该功能?
In my application I had two listboxes present in my same view. Is it possible to drag one listbox item and place the item on other listbox. I saw the functionality in iPhone. Can I achieve the same in my application? If the answer is yes how I can implement the functionality in WP7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试我的示例,我认为这会解决您的问题
https://skydrive.live.com/redir.aspx?cid=a883d6dbbdbf62f5&resid=A883D6DBBDBF62F5!107
Try out my sample, I think this will solve your issue
https://skydrive.live.com/redir.aspx?cid=a883d6dbbdbf62f5&resid=A883D6DBBDBF62F5!107
我相信倾斜效果(在瓷砖上)遵循类似的概念。您可以采取 onmanipulationstarted 事件或鼠标左键按下事件,定位触摸点并使元素跟随触摸点(一种方法是重复更改元素的 x 和 y 轴),在mouseleftbuttonup 事件或操作完成事件,并运行有关如何处理该元素的逻辑。
希望这有帮助。
I believe the tilt effect (on tiles) follows a similar concept. You can take the onmanipulationstarted event or the mouse left button down event, locate the point of touch and make the element follow the point of touch( one way would be to repeatedly change the x and y axes of the element), release the element at the mouseleftbuttonup event or manipulationcompleted event and run the logic on what to do with the element.
Hope this helps.
我在名为 Pulse 的 Windows Phone 应用程序的列表框中看到了这个拖动项目。
基本上,我的想法是当触摸或按住(取决于您决定如何触发拖动操作)发生在列表框项目中时,将其不透明度设置为0或折叠其可见性,并为该项目渲染图片,然后您可以拖动它图片(就像您将列表框项目拖到您想要的地方一样)。
不知道大家有没有看过Windows Phone工具包中ContextMenu的动画,他们就是用这种方式来做缩放效果的
I have seen this dragging item in listbox in an windows phone app called Pulse.
Basically, my thought is when touching or holding(depends on you decide how it triggers a drag action) happened in a listbox item, make its opacity to 0 or collapse its visibility, and render a picture for the item, then you can drag this picture (just looks like you drag the listboxitem) to wherever you want.
I don't know if you have seen the animation of ContextMenu in windows phone toolkit, but they just use this way to do the zoom effect