C# - Stretching a textbox to fit the containing window

As Moozhe said you need Anchor property of the control

Use the Anchor property to define how a control is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized.

But also from my experience do not forget to assign MinimumSize and MaximumSize of the control these properties helps for the control to have certain minimum or maximum size if you resize your form too small or too big.


you can also use Dock property like so:

richTextBox1.Dock = DockStyle.Fill;