The app I'm building needs two viewers side-by-side... one to show the sample / working image and one for the resulting image. I would like all of the pan and zoom actions in one viewer to be mirrored identically in the second viewer, and vice versa. Is there an existing mechanism to handle this? Do I need to handle each event myself? If I must manually handle each event, what are the minimum events I would need to account for?
Thanx,
Fred
How to Mirror Multiple GdViewer Instances
-
- Posts: 5
- Joined: Fri May 18, 2012 9:24 am
Re: How to Mirror Multiple GdViewer Instances
It's working fine with the following...
I'm calling this on ScrollViewer, AfterZoomChange, and whenever either viewer's Document changes. There's a bit of error handling mixed in there to prevent mismatched document sizes from causing an error. And, some of this may be overkill. But, it works for my purposes at the moment.
Hope this helps.
Thanx,
Fred
Code: Select all
toViewer.ZoomMode = fromViewer.ZoomMode;
toViewer.Zoom = fromViewer.Zoom;
toViewer.DocumentAlignment = fromViewer.DocumentAlignment;
toViewer.DocumentPosition = fromViewer.DocumentPosition;
toViewer.SetVScrollBarPosition(fromViewer.GetVScrollBarPosition());
toViewer.SetHScrollBarPosition(fromViewer.GetHScrollBarPosition());
Hope this helps.
Thanx,
Fred
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: How to Mirror Multiple GdViewer Instances
Hi Fred,
That's pretty much it, and if you want, you can also have a look at our Document Clean Up demo in the c# folder of the demos folder.
It has exactly what you want.
Best Regards,
Sami Kharma
GdPicture Support
That's pretty much it, and if you want, you can also have a look at our Document Clean Up demo in the c# folder of the demos folder.
It has exactly what you want.
Best Regards,
Sami Kharma
GdPicture Support
Who is online
Users browsing this forum: No registered users and 2 guests