Hello Meraj,
Here is a full exmaple for you using a MainForm (MDI Parent) and two child forms.
Hope this helps
Main.Designer.cs
namespace RadControlsWinFormsApp1
{
partial class Main
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.radMenu1 = new Telerik.WinControls.UI.RadMenu();
this.radMenuItem1 = new Telerik.WinControls.UI.RadMenuItem();
this.radDock1 = new Telerik.WinControls.UI.Docking.RadDock();
this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer();
this.radMenuItem2 = new Telerik.WinControls.UI.RadMenuItem();
((System.ComponentModel.ISupportInitialize)(this.radMenu1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).BeginInit();
this.radDock1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit();
this.SuspendLayout();
//
// radMenu1
//
this.radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] {
this.radMenuItem1,
this.radMenuItem2});
this.radMenu1.Location = new System.Drawing.Point(0, 0);
this.radMenu1.Name = "radMenu1";
this.radMenu1.Size = new System.Drawing.Size(548, 20);
this.radMenu1.TabIndex = 1;
this.radMenu1.Text = "radMenu1";
//
// radMenuItem1
//
this.radMenuItem1.Name = "radMenuItem1";
this.radMenuItem1.Text = "Launch Child Form";
this.radMenuItem1.Click += new System.EventHandler(this.radMenuItem1_Click);
//
// radDock1
//
this.radDock1.AutoDetectMdiChildren = true;
this.radDock1.Controls.Add(this.documentContainer1);
this.radDock1.Dock = System.Windows.Forms.DockStyle.Fill;
this.radDock1.DocumentManager.DocumentInsertOrder = Telerik.WinControls.UI.Docking.DockWindowInsertOrder.InFront;
this.radDock1.IsCleanUpTarget = true;
this.radDock1.Location = new System.Drawing.Point(0, 20);
this.radDock1.MainDocumentContainer = this.documentContainer1;
this.radDock1.Name = "radDock1";
this.radDock1.Padding = new System.Windows.Forms.Padding(5);
//
//
//
this.radDock1.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.radDock1.Size = new System.Drawing.Size(548, 424);
this.radDock1.SplitterWidth = 4;
this.radDock1.TabIndex = 2;
this.radDock1.TabStop = false;
this.radDock1.Text = "radDock1";
//
// documentContainer1
//
this.documentContainer1.Location = new System.Drawing.Point(5, 5);
this.documentContainer1.Name = "documentContainer1";
//
//
//
this.documentContainer1.RootElement.MinSize = new System.Drawing.Size(25, 25);
this.documentContainer1.Size = new System.Drawing.Size(538, 414);
this.documentContainer1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill;
this.documentContainer1.SplitterWidth = 4;
this.documentContainer1.TabIndex = 0;
this.documentContainer1.TabStop = false;
//
// radMenuItem2
//
this.radMenuItem2.Name = "radMenuItem2";
this.radMenuItem2.Text = "Launch Child Form 2";
this.radMenuItem2.Click += new System.EventHandler(this.radMenuItem2_Click);
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(548, 444);
this.Controls.Add(this.radDock1);
this.Controls.Add(this.radMenu1);
this.IsMdiContainer = true;
this.Name = "Main";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Main_Load);
((System.ComponentModel.ISupportInitialize)(this.radMenu1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radDock1)).EndInit();
this.radDock1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Telerik.WinControls.UI.RadMenu radMenu1;
private Telerik.WinControls.UI.RadMenuItem radMenuItem1;
private Telerik.WinControls.UI.Docking.RadDock radDock1;
private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1;
private Telerik.WinControls.UI.RadMenuItem radMenuItem2;
}
}
Main.cs
ChildForm.Designer.cs
namespace RadControlsWinFormsApp1
{
partial class ChildForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
this.SuspendLayout();
//
// radLabel1
//
this.radLabel1.Location = new System.Drawing.Point(13, 13);
this.radLabel1.Name = "radLabel1";
this.radLabel1.Size = new System.Drawing.Size(99, 16);
this.radLabel1.TabIndex = 0;
this.radLabel1.Text = "I am the child form";
//
// ChildForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.radLabel1);
this.Name = "ChildForm";
this.Text = "ChildForm";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ChildForm_FormClosed);
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Telerik.WinControls.UI.RadLabel radLabel1;
}
}
ChildForm.cs
ChildForm2.Designer.cs
namespace RadControlsWinFormsApp1
{
partial class ChildForm2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
this.SuspendLayout();
//
// radLabel1
//
this.radLabel1.Location = new System.Drawing.Point(22, 13);
this.radLabel1.Name = "radLabel1";
this.radLabel1.Size = new System.Drawing.Size(96, 16);
this.radLabel1.TabIndex = 0;
this.radLabel1.Text = "I am Child Form 2";
//
// ChildForm2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.radLabel1);
this.Name = "ChildForm2";
this.Text = "ChildForm2";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ChildForm2_FormClosed);
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Telerik.WinControls.UI.RadLabel radLabel1;
}
}
ChildForm2.cs
Let me know if you have any questions
Richard