WPF-旋转变形的对象不会旋转光标 [英] WPF - Rotate transformed object doesn't rotate cursors

查看:168
本文介绍了WPF-旋转变形的对象不会旋转光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,该程序允许将对象拖放到画布上,调整大小并旋转.我从代码项目中的DiagramDesigner 1代码开始.除了在DiagramDesigner示例中也会发生的一个问题之外,我的所有工作都运行得很好.

旋转控件(连同装饰层)后,调整大小指针上方的光标是错误的,因为它们不会旋转.例如,连接到对象右侧的光标是调整大小东西"光标. (水平的向左/向右箭头).控件旋转90度后,拇指会以旋转的方式正确调整对象的大小,但是光标仍指向左/右.

有人有更好的方法吗?光标可以旋转吗?我应该改画自己的形状吗?


不确定如何回答问题,但是是的,我希望将一个对象旋转45度将对角线拉下拇指(与该对象的底部成直角.否则旋转90度) ,光标从拖动操作中完全指向错误的方向.

I''m working on an app which allows objects to be dropped on a canvas, resized, and rotated. I started from the DiagramDesigner 1 code here on code project. I''ve got things working pretty well, except for one problem that also occurs in the DiagramDesigner example.

Once the control is rotated (along with the adorner layer), the cursors over the resize thumbs are wrong because they don''t rotate. For example, the cursor attached to the right hand side of the object is the Resize EastWest cursor. (horizontal left/right arrows). Once the control is rotated 90 degrees, the thumb correctly resizes the object in a rotated manner, but the cursor is still pointing left/right.

Anyone got a better way to do this? Can the cursors be rotated? Should I draw my own shapes instead?


Not sure how to respond to answers, but yes, I''d expect that an object turned 45 degrees would have the bottom thumb pulled diagonally (at a right angle to the bottom of the object. Otherwise for a full 90 degree rotate, the cursor is pointed completely the wrong way from the drag operation.

推荐答案

有趣的问题,恐怕我没有答案,但我怀疑光标也许不应该旋转.

如果将某物旋转45度,则调整大小的光标是可显示的,这是否意味着用户现在应该在可显示的方向上移动鼠标以放大或缩小?可能是这样,但听起来很奇怪.
Interesting question, for which I don''t have an answer I''m afraid, but I suspect the cursors perhaps should not rotate.

If you rotate something through 45 degrees, so the resize cursor is diagnal, does that imply that the user should now move their mouse in a diagnal direction to scale up or down? Possibly so, but it sounds weird.


看看 [ ^ ]链接.

旋转任何图像-图标也会旋转.非常非常酷.
您可能需要查看如何在WPF中重写此代码.
Have a look at this[^] link in Silverlight.

Rotate any of the images - the icon rotates as well. Very very cool.
You may need to look at how this code can be rewritten in WPF.


这篇关于WPF-旋转变形的对象不会旋转光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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