I have another strange behavior in BeforeZooming with LC WPF.
Code: Select all
void BeforeZooming(List<RangeChangeInfo> xRanges, List<RangeChangeInfo> yRanges, bool byWheel, ref bool cancel)
{
//foreach (RangeChangeInfo rci in xRanges)
//{
// System.Diagnostics.Debug.Print("{0} BeforeZooming() {1}..{2} -> {3}..{4}", DateTime.Now.ToString(), rci.OldMin, rci.OldMax, rci.NewMin, rci.NewMax);
//}
IsZooming = !(xRanges[0].NewMin == ZoomXMin && xRanges[0].NewMax == ZoomXMax);
if (IsZooming)
{
if (xRanges[0].NewMin + ZoomLimit >= xRanges[0].NewMax)
{
cancel = true;
}
}
if (!cancel)
{
ZoomXMin = xRanges[0].NewMin;
ZoomXMax = xRanges[0].NewMax;
}
}