Page 1 of 1
ZoomedOut, BeforeZoomingOut Events
Posted: Fri May 09, 2014 11:46 am
by frank
Hi,
in LC6 exist Zoomed and BeforeZooming events. It would be handy, if we could also get events for zooming out.
Re: ZoomedOut, BeforeZoomingOut Events
Posted: Mon May 12, 2014 2:53 pm
by ArctionPasi
Hi Frank,
these events also fire in zooming out with mouse buttons.
For example, this code shows how to investigate is it zooming in our out.
Code: Select all
void ViewXY_Zoomed(List<RangeChangeInfo> xRanges, List<RangeChangeInfo> yRanges)
{
if((xRanges[0].NewMax - xRanges[0].NewMin) > (xRanges[0].OldMax - xRanges[0].OldMin))
System.Diagnostics.Debug.WriteLine("zoomed out");
else
System.Diagnostics.Debug.WriteLine("zoomed in");
}
Re: ZoomedOut, BeforeZoomingOut Events
Posted: Mon May 12, 2014 3:01 pm
by frank
Thanks,
this tip is very helpful.
Best regards,
Frank
Re: ZoomedOut, BeforeZoomingOut Events
Posted: Tue May 13, 2014 6:05 am
by frank
Hi,
I just tried to implement your example. But in WPF I only have
Code: Select all
xRanges[0].CurrentMin
xRanges[0].CurrentMax
Re: ZoomedOut, BeforeZoomingOut Events
Posted: Mon May 19, 2014 11:51 am
by ArctionPasi
As discussed by e-mail, BeforeZooming has only Current values because zooming has not finished yet, and thus end range is not known. In Zoomed event Old and New range are available.