This project is read-only.
1
Vote

Problems when scaling items in the ZoomControl

description

Hi,

I hope you can help me on this one. I'm using the WPF Extensions toolkit, and it's a great piece of work. More precisely I'm using the zoomcontrol to show a map with some units on it (the units have the DragableBehavior attached)

Everything was working fine, until yesterday were I was told to implement a new feature in our application - scaling of the units.
If I scale the units (which are UserControls) to under 50% the drag-behavior totally messed up.

I can re-produce the error in your own test-application by putting in the following:

<Rectangle.RenderTransform>
                                    <ScaleTransform CenterX="0" CenterY="0" ScaleX="0.3" ScaleY="0.3" />
                                </Rectangle.RenderTransform>
In one of the Rectangles in the "NEW ZoomControl" tab.

Start the project and try to drag the rectangle with the scaletransform. It will behave very strange and not as expected.

I hope you can help me out here...

Thanks!

/Mikkel

file attachments

comments

mikkelbm wrote Feb 1, 2012 at 7:48 AM

I figured this issue out my self with help from the guys on the MSDN forum:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/20c011c9-aaa2-4b31-ac9c-18f92c72135c

I have attached a new implementation of the DragBehaviour class with the changes needed to get it working with scaled objects.

For more detailed information on the changes - see the MSDN thread above.

Keep up the good work - it's a great toolkit you got here!

/Mikkel