Sizing
An overview of Sizing in Eto

Explicit Sizing

Sizes can be declared explicitly in eto.

using Eto.Forms;
using Rhino.UI;

var parent = RhinoEtoApp.MainWindowForDocument(__rhino_doc__);

var dialog = new Dialog()
{
  Width = 100,
  Height = 100
};

dialog.Content = new Button() { Text = "Button" };
dialog.ShowModal(parent);

Declaring sizes forces Eto to use the sizes you give.

Explicitly Sized Button

Implicit Sizing

If no sizes are declared, or if the sizes declared are -1, Eto will auto-size controls, containers and windows.

using Eto.Forms;
using Rhino.UI;

var parent = RhinoEtoApp.MainWindowForDocument(__rhino_doc__);

var dialog = new Dialog();

dialog.Content = new Button() { Text = "I am a particularly wordy button, and I have a lot of information." };
dialog.ShowModal(parent); 
Implicitly Sized Button

Best Practices

// Minimum Sizes // Maximum Sizes? // Explicitly setting a size?