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

4 posts, 0 answers
  1. Ankur
    Ankur avatar
    2 posts
    Member since:
    Mar 2011

    Posted 01 Apr 2011 Link to this post

    Hi,

    There is any way to add user controls or controls on the e.DockWindow.DockTabStrip or at tilebar of tool window.
  2. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 06 Apr 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ankur
    Ankur avatar
    2 posts
    Member since:
    Mar 2011

    Posted 06 Apr 2011 Link to this post

    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 


  5. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 11 Apr 2011 Link to this post

    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
Back to Top