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

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

Convert a point from the coordinate space of the root element into the "client" coordinate space of the same window.
public static TransformRootToClient ( this presentationSource, Point pt ) : Point
presentationSource this
pt System.Windows.Point
Результат System.Windows.Point
        public static Point TransformRootToClient(this PresentationSource presentationSource, Point pt)
        {
            // We need to include the root element's transform.
            pt = ApplyVisualTransform(presentationSource.RootVisual, pt, false);

            // Convert from DIPs into pixels.
            pt = presentationSource.CompositionTarget.TransformToDevice.Transform(pt);

            return pt;
        }