Click here to Skip to main content
16,022,901 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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?


Edit: 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.
Posted
Updated 22-Jan-10 3:14am
v2

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.
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900