Page 1 of 1

Zoom not changing

Posted: Mon Oct 30, 2017 11:44 pm
by rstrickland1958
I am currently reviewing the tool for a customer looking to convert to WPF with a need for imaging controls. I have a simple WPF view with the WpfAnnotationViewer in the grid. I successfully loaded an image in the viewer. I now want to zoom in to 45 but when I change the zoom property nothing happens. I an using the WpfAnnotationDemo to see how this works where the view using a slider to adjust in or out on the image. I know I am missing a setting somewhere but not sure where to start.

Thanks

Re: Zoom not changing

Posted: Tue Oct 31, 2017 5:51 pm
by Alex
Hello,

The WpfImageViewer.Zoom property allows to change image zoom in image viewer:
https://www.vintasoft.com/docs/vsimagin ... /Zoom.html

Have you tried to use the WpfImageViewer.Zoom property?

Best regards, Alexander

Re: Zoom not changing

Posted: Wed Nov 01, 2017 5:29 pm
by rstrickland1958
Yes. That was the property that I was setting. Note code below:

this.documentViewer.Zoom = 100;

I got the zooming to work after setting the SizeMode to the WpfAnnotationViewer to 'Zoom'.

Is this correct way to get Zoom to work?

Re: Zoom not changing

Posted: Wed Nov 01, 2017 7:01 pm
by Alex
Hello,

Yes, this is correct. You need set the WpfImageViewer.SizeMode property to the ImageSizeMode.Zoom and specify the zoom using the WpfImageViewer.Zoom property.

Best regards, Alexander

Re: Zoom not changing

Posted: Wed Nov 01, 2017 10:41 pm
by rstrickland1958
Thanks.