I have developed a custom class that inherits from ContentControl in WPF. WIthin this content control is a single Image.
I have then attached events to the class to handle (mouse wheel) zooming and (mouse click and drag) panning based on the mouse position.
The panning uses a TranslateTransform which the zooming also uses as well as a ScaleTransform. I have created a TransformGroup and set the RenderTransform property of the Image within the ContentControl to the TransformGroup
I now wish to zoom and rotate (using RotateTransform) the image using buttons but I am having trouble getting the centerX and centerY right so the image zooms and rotates from the center point of the image.
Thanks in advance