Can RadPanel only have bottom border (or top etc)?

4 posts, 1 answers
  1. Josh
    Josh avatar
    23 posts
    Member since:
    Feb 2011

    Posted 15 Feb 2011 Link to this post

    Hey all,

    I can't seem to find a way to get the panel to only have a bottom border. It's probably pretty obvious but everything I'm trying isn't working.

    So far I've gone into the smart tag for the panel control and messed around with the 'width' property of the various borders under the layout and box area's of the properties. I've done this with both the UI.RadPanelElement and BorderPrimitive areas. I'm setting the width on the side I don't want to show to 0 and that's not working. I've also tried -1 as well as changing the BorderThickness to no avail.

    Appreciate any help with this!
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Feb 2011 Link to this post

    Hi Josh,

    In order to control each border, you first need to set the box style of the border. You can then change the border thickness for each

    Me.RadPanel1.PanelElement.PanelBorder.BoxStyle = BorderBoxStyle.FourBorders 
    Me.RadPanel1.PanelElement.PanelBorder.TopWidth = 0

    Have a look at this link which explains the border primitive that will explain all this in detail.
    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Josh
    Josh avatar
    23 posts
    Member since:
    Feb 2011

    Posted 15 Feb 2011 Link to this post

    Hey Richard,

    Thanks buddy, that did the trick! I just needed to set the BoxStyle = FourBorders. Once again, you're the man!

    Best Regards,
    Josh
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Feb 2011 Link to this post

    You're welcome!
Back to Top