使用拇指移动变换的控件产生奇怪的行为 [英] Using thumb to move transformed control produces weird behavior

查看:140
本文介绍了使用拇指移动变换的控件产生奇怪的行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用缩略图在画布上移动控件时,我遇到了一个奇怪的行为。当我添加一个控件到画布,并使用Thumb DragDelta事件移动它周围的一切看起来不错。但是当我应用旋转变换到控件拖动它周围是奇异的。控制开始环绕光标,角度越大,圆圈越大。

I've encountered a weird behavior when trying to use a thumb to move a control around on a canvas. When I add a control to a canvas and use Thumb DragDelta event to move it around everything looks good. But when I apply a rotate transform to the control dragging it around is bizarre. The control starts to circle around the cursor, and the bigger the angle the bigger the circle.

有人知道如何让拇指使用转换后的元素?我花了一整天的时间想出来,没有什么聪明的想法。

Does anyone know how to make thumb work with a transformed element? I've spent all day trying to figure it out and nothing smart is coming to my mind.

感谢您的帮助!

推荐答案

看起来Thumb的Horizo​​ntalChange和VerticalChange在旋转拇指时不会很好地播放。所以,我只是使用光标位置在画布中获取我的左和顶部偏移。它不完全准确,但它足够接近我想要做的。

It appears that Thumb's HorizontalChange and VerticalChange don't play nicely when thumb is rotated. So, I'm just using cursor location in the canvas get my left and top offsets. Its not exactly accurate, but its close enough for what I'm trying to do.

这篇关于使用拇指移动变换的控件产生奇怪的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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