Hide border of CollapsiblePanel

4 posts, 0 answers
  1. Gabriele
    Gabriele avatar
    7 posts
    Member since:
    May 2013

    Posted 11 Jun 2014 Link to this post

    Hi all,

    I am pretty sure it is very easy to achive but I just can't find it.

    I have an application that uses quite a lot of CollapsiblePanels but it also uses Tabs and so the layout has a lot of borders that make the whole stuff look a bit... restless.
    So I want to hide the border of the CollapsiblePanels without having to mess with the theme (the tool uses a theme manager and the user can switch between some of the custom themes) so I need to hide the borders in general.

    How can I do that?

    Kind regards,
    Gabriele
  2. George
    Admin
    George avatar
    500 posts

    Posted 16 Jun 2014 Link to this post

    Hello Gabriele,

    Thank you for writing.

    You can hide the border by setting the Visibility of the BorderPrimitive of the controls container to Collapsed​:
    collapsiblePanel.ControlsContainer.PanelElement.Border.Visibility = ElementVisibility.Collapsed;

    Let me know, should you have further questions.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tim
    Tim avatar
    1 posts
    Member since:
    Feb 2012

    Posted 26 Sep 2014 in reply to George Link to this post

    For some reason using your code still show the border in my application.

    I did this and the border is now hidden.

    cpnlLessUsedFields.ControlsContainer.PanelContainer.BorderStyle = BorderStyle.None;
    cpnlLessUsedFields.ControlsContainer.PanelElement.Border.Visibility = ElementVisibility.Collapsed;
  5. George
    Admin
    George avatar
    500 posts

    Posted 01 Oct 2014 Link to this post

    Hello Tim,

    Thank you for your reply.

    By default the BorderStyle of the PanelContainer is set to None, so if you have changed it, then setting it back to None in combination with the Visibility of the Border is correct.

    Do not hesitate to let me know, should you have any other questions.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top