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

RadSplitContainer Borders cannot be disabled with MaterialBlueGrey

4 Answers 186 Views
SplitContainer
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 28 Oct 2019, 04:11 PM

Hi

I wanted to disable the border of a radSplitContainer. With the theme: office2013Light the following code is working:

 

            this.radSplitContainer1.RootElement.EnableElementShadow = false;
            this.radSplitContainer1.RootElement.MinSize = new System.Drawing.Size(25, 25);
            this.radSplitContainer1.Size = new System.Drawing.Size(428, 318);
            this.radSplitContainer1.SplitterWidth = 8;
            this.radSplitContainer1.TabIndex = 0;
            this.radSplitContainer1.TabStop = false;
            this.radSplitContainer1.ThemeName = "Office2013Light";

 

With the theme MaterialBlueGrey, there is still a border on the display.

Do you have any other ideas on how I can disable the border?

 

Thank you in advance.

 

Kind Regards

Dominik

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 29 Oct 2019, 12:57 PM

Hello Dominik,

Thank you for your detailed information. Indeed your approach of setting EnableElementShadow = false is correct for Office2013Light theme. However, for MaterialBlueGrey there is 1 additional step in order to achieve the desired result.

Due to the specifics of Material themes you also have to set Visibility of each SplitPanel's border to Collapsed or Hidden in order to hide their bordersYou can achieve this in the following manner:

for (int i = 0; i < radSplitContainer1.SplitPanels.Count; i++)
{
    SplitPanel currentSplitPanel = radSplitContainer1.SplitPanels[i];
    currentSplitPanel.SplitPanelElement.Border.Visibility = ElementVisibility.Collapsed;
}

 

I hope you find this solution useful for your project.

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Dominik
Top achievements
Rank 1
answered on 29 Oct 2019, 01:35 PM

Hello Dimitar,

Thanks for the quick and detailed reply. It worked.

Regards,

Dominik

0
bla
Top achievements
Rank 1
Veteran
answered on 17 Sep 2020, 07:14 AM
Hello Dimitar, I would like to add a question here: Why can I not just set this (Me.splitPanel1.SplitPanelElement.Border.Visibility = ElementVisibility.Hidden) in the Designer? Or is there a way that I don't see?
0
Nadya | Tech Support Engineer
Telerik team
answered on 18 Sep 2020, 02:28 PM

Hello,

If it is more suitable to do so in the Designer.cs file feel free to make this change there.

Should you have other questions please let me know.

Regards,
Nadya
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
SplitContainer
Asked by
Dominik
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Dominik
Top achievements
Rank 1
bla
Top achievements
Rank 1
Veteran
Nadya | Tech Support Engineer
Telerik team
Share this question
or