Xamarin Forms 在视图之间拖动图像 [英] Xamarin Forms Drag Image between Views

查看:29
本文介绍了Xamarin Forms 在视图之间拖动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Xamarin Forms 中有一个应用程序,我需要用户可以从下面选择一个图像并在顶部视图中拖动到他想要的任何位置,想法是:带有图像的下面的视图是家庭房间,并且顶视图是室内植物,用户可以通过拖动和旋转图像来创建他的室内植物,最后将顶视图保存为 jpg 或 png 图像.

I have an application in Xamarin Forms, and I need that the user can choose one image from below and drag anywhere he wants to in the top view, the idea is: The below view with the images are the home rooms, and the top view is the Houseplant, the user can create his houseplant by dragging and rotating the images, and then finally save the top view as a jpg or png image.

我在这里搜索了 2 3 页关于拖动等的谷歌,但我没有找到任何可以帮助我的东西,我尝试了平移手势、点击手势,但没有成功 =[

I've searched here and 2 3 pages of google about drag and etc, but I haven't found anything that could help me with that, I tried pan gesture, tap gesture, but no success =[

对不起,如果它重复或什么的,这是我的第一篇文章,我真的找不到任何东西.

Sorry if it is duplicated or something, this is my first post, and I really couldn't find anything.

如何在 Xamarin.Forms 或至少使用自定义渲染器等中使用它?

How can I get this working in Xamarin.Forms or at least with custom renderers and etc?

谢谢各位.

我需要的示例图片

推荐答案

确保您的页面或图像不在滚动视图中.如果为两个方向都启用了 ScrollView,则 Pan-Gesture 将不起作用...

Make sure your page or Image is not in a scrollView. If ScrollView is enabled for both orientations, Pan-Gesture wont work. . .

这篇关于Xamarin Forms 在视图之间拖动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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