亲爱的,
我需要建立一定的互动,如下所示: 我有一个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框的项目源?
发布评论