Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Dock > How to ged rid of this border?

Answered How to ged rid of this border?

Feed from this thread
  • Stefan avatar

    Posted on May 26, 2011 (permalink)

    Hello,

    I'm using a Rad Dock with some TabedToolWindows. I'm currently trying to change colors by "Edit UI Elements"-Task on the Tabstrip. Can you tell me how I can change the color of the Border around the ToolWindows or how to set it to invisible?
    I marked it red with Photoshop in the attached picture.

    Thanks.
     
    Attached files

    Reply

  • Stefan Stefan admin's avatar

    Posted on May 30, 2011 (permalink)

    Hi Stefan,

    Thank you for writing.

    You can hide the border that you have mentioned by setting the BaseFillBorder.Visibility property of the TabStripElement contained in the DocumentTabStrip. Here is how you can do that:
    documentTabStrip1.TabStripElement.BaseFillBorder.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

    However, if you perform docking operation, and take one of the document windows and dock it outside its document tab strip, new document tab strip will be created for this window and the border for it will appear. To handle this case, you can subscribe to the DockTabStripNeeded event of RadDock, create your own instance of DocumentTabStrip, remove its border and assign it to the Strip property provided in the event args. Follows the whole implementation of the described functionality:

    public Form1()
    {
        InitializeComponent();
        //remove the initial document tab strip border
        documentTabStrip1.TabStripElement.BaseFillBorder.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
         
        radDock1.DockTabStripNeeded += new DockTabStripNeededEventHandler(radDock1_DockTabStripNeeded);
    }
     
    void radDock1_DockTabStripNeeded(object sender, DockTabStripNeededEventArgs e)
    {
        //when docking new document tab strip is needed. Create one, remove its border and assign it to the control
        DocumentTabStrip strip = new DocumentTabStrip();
        strip.TabStripElement.BaseFillBorder.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        e.Strip = strip;
    }

    I hope the provided information addresses your question. Should you have any other questions, do not hesitate to contact us. 

    Greetings,
    Stefan
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.

    Reply

  • Stefan avatar

    Posted on May 30, 2011 (permalink)

    Hi Stefan,

    thank you very much for your answer. It seems as if I did not make clear which border I was talking about. To clarify I added another screenshot. The code snippet you provided hides the small red border. I am looking for a way to hide the inner border (I filled it Yellow in Photoshop).

    Thanks and best regards,
    Stefan
    Attached files

    Reply

  • Answer Stefan Stefan admin's avatar

    Posted on Jun 1, 2011 (permalink)

    Hello Stefan,

    Thank you for writing.

    The border that you see is a result of a padding setting of one of the elements of TabStripElement. So, in order to remove the border, you should just remove the padding as shown below:
    documentTabStrip1.TabStripElement.Children[0].Children[1].Padding = new Padding(0);

    Let me know if you need anything else.
     
    Kind regards,
    Stefan
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.

    Reply

  • Stefan avatar

    Posted on Jun 1, 2011 (permalink)

    Hi Stefan,

    that solved it. Thank you very much.

    Stefan

    Reply

  • Stefan avatar

    Posted on Sep 19, 2011 (permalink)

    Hi,

    unfortunately it seems as if this has changed in Q2 2011.
    Could you please provide a code update for this?

    Thank you.

    Stefan

    Reply

  • Stefan Stefan admin's avatar

    Posted on Sep 21, 2011 (permalink)

    Hi Stefan,

    Thank you for writing back.

    Indeed, in Q2 2011 we have changed the internal structure of RadDock. This was caused by the fact that we have replaced the obsolete RadTabStrip contained in RadDock, with RadPageView.

    The yellow border from your screen shot is now part of the FillPrimitive of the SplitPanelElement. Here is how to hide this FillPrimitive:
    radDock1.SplitPanelElement.Fill.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

    Let me know if this works for you.

    Greetings,
    Stefan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Axel Reiz avatar

    Posted on Dec 6, 2011 (permalink)

    Hi Telerik team,

    in Winforms Q3 2011 your solution RadDoc.SplitPanelElement.Fill.Visibility set to collapsed doesn't work.
    Please take a look at the attached screenshot

    Best regards
    Axel
    Attached files

    Reply

  • Jack Jack admin's avatar

    Posted on Dec 8, 2011 (permalink)

    Hello Axel Reiz, 

    You can use the following code to hide the border:
    DockTabStrip dockTabStrip = this.radDock1.GetDefaultDocumentTabStrip(false);
    dockTabStrip.TabStripElement.ContentArea.Padding = new Padding(0);

    If the issue continues to appear, please send us your application and describe in detail the desired look. I will be glad to help further.

    Best wishes,
    Jack
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

  • Axel Reiz avatar

    Posted on Dec 8, 2011 (permalink)

    Hi Jack,

    it works fine.Thanks for your assistance.
    Best regards

    Axel

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Dock > How to ged rid of this border?
Related resources for "How to ged rid of this border?"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]