AdvancedLauncher.Tools.Extensions.PresentationSourceExtensions.TransformClientToRoot C# (CSharp) Метод

TransformClientToRoot() публичный статический Метод

Convert a point from "client" coordinate space of a window into the coordinate space of the root element of the same window.
public static TransformClientToRoot ( this presentationSource, Point pt ) : Point
presentationSource this
pt System.Windows.Point
Результат System.Windows.Point
        public static Point TransformClientToRoot(this PresentationSource presentationSource, Point pt)
        {
            // Convert from pixels into DIPs.
            pt = presentationSource.CompositionTarget.TransformFromDevice.Transform(pt);

            // We need to include the root element's transform.
            pt = ApplyVisualTransform(presentationSource.RootVisual, pt, true);

            return pt;
        }