Zoom not changing

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
rstrickland1958
Posts: 10
Joined: Mon Oct 30, 2017 11:16 pm

Zoom not changing

Post 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
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Zoom not changing

Post 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
rstrickland1958
Posts: 10
Joined: Mon Oct 30, 2017 11:16 pm

Re: Zoom not changing

Post 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?
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Zoom not changing

Post 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
rstrickland1958
Posts: 10
Joined: Mon Oct 30, 2017 11:16 pm

Re: Zoom not changing

Post by rstrickland1958 »

Thanks.
Post Reply