public void SetEditorBounds(EditorContext context) { Size size = CalculateEditorSize(context); context.Editor.Bounds = new Rectangle(context.Bounds.X, context.Bounds.Y, Math.Min(size.Width, context.Bounds.Width), context.Bounds.Height); }