Code/C#
[C#] DockPanel Suite Sample
Hide Code
2009. 1. 5. 14:26
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace DockPanelSample
{
public partial class FormChild : DockContent
{
public FormChild()
{
InitializeComponent();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace DockPanelSample
{
public partial class FormChild : DockContent
{
public FormChild()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace DockPanelSample
{
public partial class FormMain : Form
{
private FormChild formChild1;
private FormChild formChild2;
private FormChild formChild3;
private FormChild formChild4;
public FormMain()
{
InitializeComponent();
InitializeMyComponent();
}
private void InitializeMyComponent()
{
formChild1 = new FormChild();
formChild2 = new FormChild();
formChild3 = new FormChild();
formChild4 = new FormChild();
}
private void FormMain_Load(object sender, EventArgs e)
{
formChild1.Show(dockPanelMain, DockState.DockLeft);
formChild2.Show(dockPanelMain, DockState.DockLeft);
formChild3.Show(dockPanelMain);
formChild4.Show(dockPanelMain);
formChild2.DockPanel.DockLeftPortion = 0.30;
formChild2.DockTo(formChild1.Pane, DockStyle.Bottom, 0);
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace DockPanelSample
{
public partial class FormMain : Form
{
private FormChild formChild1;
private FormChild formChild2;
private FormChild formChild3;
private FormChild formChild4;
public FormMain()
{
InitializeComponent();
InitializeMyComponent();
}
private void InitializeMyComponent()
{
formChild1 = new FormChild();
formChild2 = new FormChild();
formChild3 = new FormChild();
formChild4 = new FormChild();
}
private void FormMain_Load(object sender, EventArgs e)
{
formChild1.Show(dockPanelMain, DockState.DockLeft);
formChild2.Show(dockPanelMain, DockState.DockLeft);
formChild3.Show(dockPanelMain);
formChild4.Show(dockPanelMain);
formChild2.DockPanel.DockLeftPortion = 0.30;
formChild2.DockTo(formChild1.Pane, DockStyle.Bottom, 0);
}
}
}