internal static Point Translate(this UIElement fromElement, UIElement toElement, Point fromPoint) { if (fromElement == toElement) { return(fromPoint); } else { return(fromElement.TransformToVisual(toElement).Transform(fromPoint)); } }