In a very simple example docking works perfectly, so I suspect you need to provide more information about the problem.
using System;
using System.Windows.Forms;
namespace UserControlDocking {
public class MainForm : Form {
[STAThread]
static void Main() {
Application.Run(new MainForm());
}
TableLayoutPanel tlp;
protected override void OnShown(EventArgs e) {
base.OnShown(e);
tlp = new TableLayoutPanel();
tlp.Dock = DockStyle.Fill;
tlp.RowCount = 2;
tlp.ColumnCount = 2;
tlp.GrowStyle = TableLayoutPanelGrowStyle.FixedSize;
tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tlp.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tlp.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
Controls.Add(tlp);
AddDockedControl(0, 0, System.Drawing.Color.Red);
AddDockedControl(1, 0, System.Drawing.Color.Green);
AddDockedControl(1, 0, System.Drawing.Color.Blue);
AddDockedControl(1, 1, System.Drawing.Color.Yellow);
}
private void AddDockedControl(int col, int row, System.Drawing.Color colour) {
UserControl newOne = new UserControl();
newOne.BorderStyle = BorderStyle.FixedSingle;
newOne.BackColor = colour;
newOne.Dock = DockStyle.Fill;
tlp.Controls.Add(newOne, col, row);
}
}
}