protected override void OnSizeRequested (ref Gtk.Requisition requisition) { if (!IsRealized || layout == null) { return; } int width, height; layout.GetPixelSize (out width, out height); requisition.Width = width; requisition.Height = height; }