private void OnHostBoundsChanged(object sender, EventArgs e) { var bounds = _dockHost.RectangleToScreen(_dockHost.Bounds); Location = new Point( bounds.X + (bounds.Width - 112) / 2, bounds.Y + (bounds.Height - 112) / 2); }