Zoom not changing

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

Moderator: Alex

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

Zoom not changing

Post by rstrickland1958 » Mon Oct 30, 2017 11:44 pm

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: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: Zoom not changing

Post by Alex » Tue Oct 31, 2017 5:51 pm

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: 3
Joined: Mon Oct 30, 2017 11:16 pm

Re: Zoom not changing

Post by rstrickland1958 » Wed Nov 01, 2017 5:29 pm

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: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: Zoom not changing

Post by Alex » Wed Nov 01, 2017 7:01 pm

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: 3
Joined: Mon Oct 30, 2017 11:16 pm

Re: Zoom not changing

Post by rstrickland1958 » Wed Nov 01, 2017 10:41 pm

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest