WinForm里使用 WeifenLuo.WinFormsUI.Docking
using System; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; namespace WinFormWenLuoUiDockingDemo { ////// WinForm里使用 WeifenLuo.WinFormsUI.Docking /// https://www.cnblogs.com/LifeDecidesHappiness/p/15672612.html /// LDH @ 2021-12-10 /// Nuget:WeifenLuo.WinFormsUI.Docking /// public partial class FrmMain : Form { public FrmMain() { InitializeComponent(); } private void FrmMain_Load(object sender, EventArgs e) { InitControls(); } private void InitControls() { Text = @"WinForm里使用 WeifenLuo.WinFormsUI.Docking"; dockPanel1.Dock = DockStyle.Fill; IsMdiContainer = true; var form1 = new Frm1(); form1.Show(dockPanel1, DockState.DockLeft); var form2 = new Frm2(); form2.Show(dockPanel1, DockState.DockRight); var form3 = new Frm3(); form3.Show(dockPanel1, DockState.Document); } } }