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

How to ged rid of this border?

12 Answers 574 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 26 May 2011, 12:16 PM
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.
 

12 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 30 May 2011, 01:38 PM
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.
0
Stefan
Top achievements
Rank 1
answered on 30 May 2011, 02:07 PM
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
0
Accepted
Stefan
Telerik team
answered on 01 Jun 2011, 10:06 AM
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.
0
Stefan
Top achievements
Rank 1
answered on 01 Jun 2011, 10:28 AM
Hi Stefan,

that solved it. Thank you very much.

Stefan
0
Stefan
Top achievements
Rank 1
answered on 19 Sep 2011, 09:42 AM
Hi,

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

Thank you.

Stefan
0
Stefan
Telerik team
answered on 21 Sep 2011, 03:43 PM
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 >>

0
axel
Top achievements
Rank 1
answered on 06 Dec 2011, 07:52 PM
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
0
Jack
Telerik team
answered on 08 Dec 2011, 04:07 PM
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.

0
axel
Top achievements
Rank 1
answered on 08 Dec 2011, 05:26 PM
Hi Jack,

it works fine.Thanks for your assistance.
Best regards

Axel
0
George
Top achievements
Rank 1
answered on 20 Apr 2013, 09:21 AM
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,
0
Stefan
Telerik team
answered on 24 Apr 2013, 11:37 AM
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.
0
George
Top achievements
Rank 1
answered on 24 Apr 2013, 12:55 PM
seems to work, thanks
Tags
Dock
Asked by
Stefan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Stefan
Top achievements
Rank 1
axel
Top achievements
Rank 1
Jack
Telerik team
George
Top achievements
Rank 1
Share this question
or