This is a migrated thread and some comments may be shown as answers.

How to add ad user control to a tabbedDocument

1 Answer 40 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Shirya
Top achievements
Rank 1
Shirya asked on 22 Oct 2008, 04:01 PM
Hello,
I have a docking manager, and when a button is clicked, It add a documentPane to my docking manager:

  DocumentPane docPane = new DocumentPane();  
  docPane.Text = "Test Document";  
  dockingManager1.SetDocument(docPane);

I would like to add a user control to every new documentPane,
do you know how?
Thanx
shirya


1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 23 Oct 2008, 02:11 PM
Hello Shirya,

You can add an UserControl to the Controls collection of the DocumentPane:

DocumentPane docPane = new DocumentPane(); 
docPane.Text = "Test Document"
dockingManager1.SetDocument(docPane); 
UserControl userControl = new UserControl(); 
userControl.Dock = DockStyle.Fill; 
docPane.Controls.Add(userControl); 


Best wishes,
Julian Benkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Shirya
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or