/// <summary>
        /// Sets the height of the title bar.
        /// </summary>
        /// <param name="newHeight">New height.</param>
        /// <param name="adjustWindowFrame">If set to <c>true</c> adjust window frame.</param>
        public void SetTitleBarHeight(nfloat newHeight, bool adjustWindowFrame)
        {
            if (Math.Abs(_titleBarHeight - newHeight) < EPSILON)
            {
                return;
            }
            var windowFrame = Frame;

            if (adjustWindowFrame)
            {
                windowFrame.Location = new CGPoint(windowFrame.X, windowFrame.Y - newHeight - _titleBarHeight);
                windowFrame.Size     = new CGSize(windowFrame.Width, windowFrame.Height + newHeight - _titleBarHeight);
            }

            _titleBarHeight = _cachedTitleBarHeight = newHeight;

            SetFrame(windowFrame, true);
            LayoutTrafficLightsAndContent();
            DisplayWindowAndTitleBar();
            if ((StyleMask & NSWindowStyle.TexturedBackground) == NSWindowStyle.TexturedBackground)
            {
                ContentView.DisplayIfNeeded();
            }
            if (MinSize.Height < _titleBarHeight)
            {
                MinSize = new CGSize(MinSize.Width, _titleBarHeight);
            }
        }