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

Bug? 'Telerik.WinControls.UI.Docking.AutoHideStripLayout' is inaccessible due to its protection level

3 Answers 183 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Froggie
Top achievements
Rank 1
Froggie asked on 16 Feb 2012, 03:54 PM
I made a Test-Project to test the RadDock and got a error when setting Properties of "AutoHideStripLayout" via Designer.
Also i want to get rid of the BackColor because I only want the dafeault Winforms look.

See the sample-project. http://www.file-upload.net/download-4121547/RadDockTest.zip.html

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 21 Feb 2012, 02:52 PM
Hi Sebastian,

The AutoHideStripLayout is an internal class for a very long time and this serialization is invalid.

To resolve the issues, please comment the two AutoHideStripLayout lines of code in the Form1.Designer.cs:

//((Telerik.WinControls.UI.Docking.AutoHideStripLayout)(this.radDock1.GetChildAt(0).GetChildAt(2))).Alignment = System.Drawing.ContentAlignment.MiddleLeft;
 //((Telerik.WinControls.UI.Docking.AutoHideStripLayout)(this.radDock1.GetChildAt(0).GetChildAt(2))).Shape = null;

You can change the BackColor of DocumentTabStripContainer. Here is a sample:
public Form1()
{
    InitializeComponent();
 
    this.radDock1.GetDefaultDocumentTabStrip(true).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(255)))), ((int)(((byte)(10)))));
}

Please view the result in the attached screenshot.

Regards,
Julian Benkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Froggie
Top achievements
Rank 1
answered on 21 Feb 2012, 03:08 PM
All right. Now this brought up two questions:
  1. Why I'm able to set the properties via designer?
  2. When I close the ToolWindow, then the BackColor is changed back. Why?

So your answer only partially solved my problem.

0
Julian Benkov
Telerik team
answered on 23 Feb 2012, 02:39 PM
Hi Sebastian,

1)  Currently, we can not reproduce this behavior and there is no explanation why this code is serialized in your Form. If you isolate the issue and steps to reproduce, please share with us this information to address the issue accordingly.

2) The issue is that the RadDock control is dynamic and recreates at run-time some parts of its contents during the docking (layout) operation. To use custom BackColor in your application, you should edit the theme that RadDock uses. Here is a sample of loading and setting a customized theme:

public Form1()
{
    InitializeComponent();
 
    ThemeResolutionService.LoadPackageFile("C:\\MyControlDefault.tssp");
    this.radDock1.ThemeName = "MyControlDefault";
}

To change the properties of the theme, you can use Visual Style Builder. Please view the attached screenshots for the details. I am also attaching the modified ControlDefault theme package.

More information about custom themes you can find in our online documentation.

All the best,
Julian Benkov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Dock
Asked by
Froggie
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Froggie
Top achievements
Rank 1
Share this question
or