Page 1 of 1

Image scroll position / zoom

Posted: Tue Oct 10, 2023 4:35 pm
by gianni.sanzone
HI,

my goal is this:

show an image on the image viewer and enlarge the image. I would like to save the current situation (coordinates or scroll positions and index zoom).
When reloading the image on the image viewer, I would like to set the same zoom and scroll position.

Is there a class that manages the view or will I do it with the ScrollToPoint function?
Could i use HorizontalScroll/VerticalScroll properties?

Thanks

Re: Image scroll position / zoom

Posted: Wed Oct 11, 2023 3:54 pm
by Alex
Hi,

Do you want to work with zoom and scrolls in WinForms, WPF or Web image viewer?

Best regards, Alexander

Re: Image scroll position / zoom

Posted: Wed Oct 11, 2023 3:57 pm
by gianni.sanzone
Sorry,

i'm working in WinForms,

thanks

Re: Image scroll position / zoom

Posted: Wed Oct 11, 2023 4:50 pm
by Alex
Thank you for information.

If you want to get or set the current zoom in WinForms image viewer, you need to use the ImageViewer.ZoomExtended property.

If you want to get or set the current scroll position in WinForms image viewer, you need to use the ImageViewer.AutoScrollPositionEx property.

Best regards, Alexander