private double GetDeltaYCrop(Image imageOriginal) { ViewportControl viewportControl = null; for (FrameworkElement frameworkElement = (FrameworkElement)imageOriginal; frameworkElement != null; frameworkElement = VisualTreeHelper.GetParent((DependencyObject)frameworkElement) as FrameworkElement) { if (frameworkElement is ViewportControl) { viewportControl = frameworkElement as ViewportControl; break; } } double num1 = 0.0; if (viewportControl != null) { Rect rect = ((UIElement)imageOriginal).TransformToVisual((UIElement)viewportControl).TransformBounds(new Rect(0.0, 0.0, ((FrameworkElement)imageOriginal).ActualWidth, ((FrameworkElement)imageOriginal).ActualHeight)); // ISSUE: explicit reference operation double num2 = rect.Top - AttachedProperties.GetExtraDeltaYCropWhenHidingImage((DependencyObject)viewportControl); if (num2 < 0.0) { num1 = -num2; } } return(num1); }