1

I'm working in a WPF project where I have to zoom an image, hence scrollviewer is needed when the image is zoomed.

I have achieved the zoom with delta manipulation matrix etc.

The problem is, using RenderTransform, scrollviewer doesn't work because i'm guesssing it assumes the position/layout never change. But when I use LayoutTranform, the scrollviewer works fine, but I can't zoom to the mouse position (ManipulationOrigin).

Is there a way I can achieve image zoom to ManipulationOrigin with LayoutTransformation and scrollviewer (WPF C#)

With this code:

ImageCanvas.RenderTransform = new MatrixTransform(matrix);

scrollviewer doesn't work, but image manipulation to mouse position / ManipulationOrigin work fine.

But with this code:

ImageCanvas.LayoutTransform = new MatrixTransform(matrix);

scrollviewer works fine but image manipulation to mouse position / ManipulationOrigin doesn't work.

Basically, I need both scrollviewer and image manipulation to mouse position to work.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.