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

How we can add Controls or User Controls on e.DockWindow.DockTabStrip?

3 Answers 64 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ankur
Top achievements
Rank 1
Ankur asked on 01 Apr 2011, 08:38 AM
Hi,

There is any way to add user controls or controls on the e.DockWindow.DockTabStrip or at tilebar of tool window.

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 06 Apr 2011, 09:44 AM
Hello Ankur,

Thank you for your question.

In order to add UserControls in RadDock, you should follow the API provided in this article.

As to the titlebar area of the ToolWindows, you can add elements to the CaptionElement of ToolTabStrip:
private void radDock1_DockWindowAdded(object sender, DockWindowEventArgs e)
{
    e.DockWindow.Text = String.Empty;
 
    RadLabelElement radLabelElement = new RadLabelElement();
    radLabelElement.Text = "ABC";
    ToolTabStrip toolTabStrip = e.DockWindow.DockTabStrip as ToolTabStrip;
    toolTabStrip.CaptionElement.Children.Add(radLabelElement);
}

I hope it helps. Please write back if you have additional questions.

Best regards,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ankur
Top achievements
Rank 1
answered on 06 Apr 2011, 11:55 AM
Hi,
Thanks for your reply.
Please go through my actual requirement.
private
 void radDock1_DockWindowAdded(object sender, DockWindowEventArgs e)
{
    e.DockWindow.Text = String.Empty;
  
    RadLabelElement radLabelElement = new RadLabelElement();
    radLabelElement.Text = "ABC";
    ToolTabStrip toolTabStrip = e.DockWindow.DockTabStrip as ToolTabStrip;
    toolTabStrip.CaptionElement.Children.Add(radLabelElement);
}

The above code is working properly but i want to add Combobox,textbox and buttons 
on e.DockWindow.DockTabStrip which is not working.Giving error only Tabpanel type controls are allowed.

I want to do that something like this....

private void radDock1_DockWindowAdded(object sender, DockWindowEventArgs e)
{
    e.DockWindow.Text = String.Empty;
  
    RadComboboxElement radComboboxElement = new 
RadComboboxElement 
();
    radLabelElement.Text = "ABC";
    ToolTabStrip toolTabStrip = e.DockWindow.DockTabStrip as ToolTabStrip;
    toolTabStrip.CaptionElement.Children.Add(
radComboboxElement 
);
}
I am waiting for your kind response.

Thanks 


0
Alexander
Telerik team
answered on 11 Apr 2011, 09:56 AM
Hello Ankur,

Currently elements containing TextBox control in its structure are not supported in this scenario and they cannot be added inside the 'caption' area of ToolTabStrip. This is why you receive the described exception adding RadComboBoxElement. We will consider implementing this scenario in one of our upcoming releases.

If you have further questions, do not hesitate to contact me.

Best regards,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Dock
Asked by
Ankur
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Ankur
Top achievements
Rank 1
Share this question
or