How to ged rid of this border?

13 posts, 1 answers
  1. Stefan
    Stefan avatar
    10 posts
    Member since:
    Feb 2009

    Posted 26 May 2011 Link to this post

    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.
     
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 30 May 2011 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Stefan avatar
    10 posts
    Member since:
    Feb 2009

    Posted 30 May 2011 Link to this post

    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
  5. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 01 Jun 2011 Link to this post

    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.
  6. Stefan
    Stefan avatar
    10 posts
    Member since:
    Feb 2009

    Posted 01 Jun 2011 Link to this post

    Hi Stefan,

    that solved it. Thank you very much.

    Stefan
  7. Stefan
    Stefan avatar
    10 posts
    Member since:
    Feb 2009

    Posted 19 Sep 2011 Link to this post

    Hi,

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

    Thank you.

    Stefan
  8. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 21 Sep 2011 Link to this post

    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 >>

  9. axel
    axel avatar
    51 posts
    Member since:
    Jan 2010

    Posted 06 Dec 2011 Link to this post

    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
  10. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 08 Dec 2011 Link to this post

    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.

  11. axel
    axel avatar
    51 posts
    Member since:
    Jan 2010

    Posted 08 Dec 2011 Link to this post

    Hi Jack,

    it works fine.Thanks for your assistance.
    Best regards

    Axel
  12. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 20 Apr 2013 Link to this post

    Hi all, 

    I face the same problem in an application I am developing using the most recent 2013 dock control. Basically It will be great if we can get a definite answer on how to permanently get rid of the annoying border under the following scenarios:

    (a) Initially created as a mdi child tabbed document. Inside the forum there are more than four or five solutions proposed for this problem

    (b) Solving it for step (a) if this tabbed document is then converted by the user to a floating element, then the annoying border reappears! not sure how to solve this.

    (c) the floating element is then dragged back by the user into the mdi form as a tabbed document, the annoying border appears again 

    Can you please provides us with a more concrete way to handle this border issue taking into consideration all the incarnations as above?

    Thanks,
  13. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 24 Apr 2013 Link to this post

    Hello George,

    Using the DockTabStripNeeded event should suffice covering your cases:
    private void radDock1_DockTabStripNeeded(object sender, DockTabStripNeededEventArgs e)
           {
     
               DockTabStrip strip;
               if (e.DockType == DockType.Document)
               {
                   strip = new DocumentTabStrip();
               }
               else
               {
                   strip = new ToolTabStrip();
               }
               strip.TabStripElement.ContentArea.Padding = new Padding(0);
               e.Strip = strip;
     
               radDock2.SplitPanelElement.Fill.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
           }

    Please give this approach a try and let me know how it works for you.
     

    Greetings,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  14. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 24 Apr 2013 Link to this post

    seems to work, thanks
Back to Top
UI for WinForms is Visual Studio 2017 Ready