private float GetTitleBarHeight() { RectangleF contentRect = NSWindow.ContentRectFor( _mainWindow.Frame, _mainWindow.StyleMask); return _mainWindow.Frame.Height - contentRect.Height; }