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

4 posts, 0 answers
  1. Froggie
    Froggie avatar
    29 posts
    Member since:
    Jan 2012

    Posted 16 Feb 2012 Link to this post

    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
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 21 Feb 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Froggie
    Froggie avatar
    29 posts
    Member since:
    Jan 2012

    Posted 21 Feb 2012 Link to this post

    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.

  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 23 Feb 2012 Link to this post

    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 >>
Back to Top