示例#1
0
        /// <summary>
        /// Returns the size of a window, given its window handle.
        /// </summary>
        public static Rectangle GetClientRectangle(IntPtr windowHandle, bool sizeOnly = true)
        {
            switch (PlatformId)
            {
            case PlatformIdSubset.Windows:
                return(Windows.GetClientRect(windowHandle));

            case PlatformIdSubset.Linux:
                return(Linux.GetClientRect(windowHandle, sizeOnly));

            default:
                return(new Rectangle(0, 0, 300, 300));
            }
        }