Hello again Fabien,
Me, for one i prefer the Dock for such things, but here you have an example on how to add normal forms to pages as controls, i hope this helps:
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
using
Telerik.WinControls.UI;
namespace
IntergratingFormsInPageView
{
public
partial
class
Form1 : Form
{
private
RadPageView radPageView1;
public
Form1()
{
InitializeComponent();
this
.Controls.Add(radPageView1 =
new
RadPageView());
radPageView1.Size =
new
Size(
this
.ClientSize.Width,
this
.ClientSize.Height - 24);
radPageView1.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
var addFormButton =
new
RadButton();
addFormButton.Text =
"Add Form"
;
addFormButton.Click +=
new
EventHandler(addFormButton_Click);
addFormButton.Dock = DockStyle.Bottom;
this
.Controls.Add(addFormButton);
}
void
addFormButton_Click(
object
sender, EventArgs e)
{
var childForm =
new
ChildForm();
childForm.TopLevel =
false
;
childForm.Dock = DockStyle.Fill;
childForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
var page =
new
RadPageViewPage();
childForm.Parent = page;
page.Text =
"Page "
+ (radPageView1.Pages.Count + 1).ToString();
page.Controls.Add(childForm);
radPageView1.Pages.Add(page);
childForm.Show();
}
}
public
class
ChildForm : Form
{
public
ChildForm()
{
InitializeComponent();
this
.Controls.Add(
new
RadTextBox());
var grid =
new
RadGridView();
grid.Dock = DockStyle.Bottom;
this
.Controls.Add(grid);
}
private
System.ComponentModel.IContainer components;
protected
override
void
Dispose(
bool
disposing)
{
if
(disposing && (components !=
null
))
{
components.Dispose();
}
base
.Dispose(disposing);
}
#region Windows Form Designer generated code
private
void
InitializeComponent()
{
this
.components =
new
System.ComponentModel.Container();
this
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this
.Text =
"Form1"
;
}
#endregion
}
}
It seems pretty straight forward to me...
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga