Beispiel #1
0
        /// <summary>
        /// Transform the provided rectangle to fit the scale and position of the window.
        /// </summary>
        /// <param name="rect">The rect to transform.</param>
        /// <returns>The transformed rectangle.</returns>
        public Rect GetFullWindowRect(ref Rect rect)
        {
            uint dpi = DEFAULT_DPI;

            if (IsWindows10AnniversaryUpdateOrGreaterWin32)
            {
                dpi = User32.GetDpiForWindow(_windowHandle);
            }

            GetFullWindowRect(DetermineWindowStyle(), WindowExStyles.WS_EX_APPWINDOW, dpi, ref rect);
            return(rect);
        }