Scatterview Items作为SurfacList框的项目源?

编程入门 行业动态 更新时间:2024-10-28 20:16:42
本文介绍了Scatterview Items作为SurfacList框的项目源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

亲爱的,

我需要建立一定的互动,如下所示: 我有一个SurfaceListBox,其中我实际上有ItemSource是图像。我想要得到的交互是,SurfaceList框中的任何一个应该能够由用户旋转。由于sctatterview项已经实现了旋转操作,我想知道它是否适合添加为SurfaceList框Items Scatterview项。然后用户将能够轻松旋转。

I need to build a certain interaction which will be as follow: I have a SurfaceListBox in which I have actually ItemSource to be Images. The interaction that I would like to get is that any ietms in teh SurfaceList box should be able to rotate by user. As sctatterview items already implement that rotation manipulation, I was wondering if it is suitable to add as SurfaceList box Items Scatterview item. Then users will be able to rotate easily .

建议的鸣叫为问候

Thnaks for advise regards

serge

推荐答案

ScatterView本身就是ItemsPresenter,就像ListBox一样。你当然可以在列表中有几个ScatterViews(每个listboxitem一个),但我认为自己实现轮换逻辑会更容易。这不应该太难。 OnTouchDown 开始旋转,使用OnTouchChanged计算旋转并使用RotateTranform旋转listboxitem(或其内容)。在TouchUp上停止旋转。

A ScatterView is an ItemsPresenter itself, just like the ListBox. You could of course have several ScatterViews (one per listboxitem) in the list, but I think it would be easier to implement rotation logic yourself. It shouldn't be too hard. OnTouchDown start the rotation, use OnTouchChanged to calculate the rotation and use a RotateTranform to rotate the listboxitem (or its content). On TouchUp stop the rotation.

您可能会发现旋转逻辑会干扰列表框的触摸逻辑,因此可能会使其至少进行两次触摸。

You might find that the rotation logic will interfere with the touch logic of the listbox, so maybe make it condition for having at least two touches.

希望这会有所帮助。如果没有,我很乐意创建一个示例项目。

Hope this helps. If not, I'd be happy to create a sample project.

再见,

-bart -

-bart-

更多推荐

Scatterview Items作为SurfacList框的项目源?

本文发布于:2023-11-25 22:17:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631573.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   Scatterview   Items   SurfacList

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!