Panel opacity

6 posts, 0 answers
  1. Roberto Wenzel
    Roberto Wenzel avatar
    41 posts
    Member since:
    Sep 2012

    Posted 18 Feb 2012 Link to this post

    Hello,
    I am trying to set the opacity value for a WinForm RadPanel.
    Could someone please give me a hint how to manage that?
    Thank you in advance.
    Cheers Roberto
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 24 Feb 2012 Link to this post

    Hi Roberto,

    Thank you for writing and please accept my apologies for the delayed reply.

    In the WinForms technology only forms have Opacity property and the value of that property is inherited by all controls placed on that form.

    If what you want to do is to make the back color transparent then you can just set the BackColor property of the RadPanel to Color.Transparent. You should note that in WinForms transparency actually means that the back color of the control is set to the color(s) of the parent control. 

    If this is not what you want I would kindly ask you to provide some more details on what are you trying to achieve.

    I am looking forward to your reply.

    All the best,
    Ivan Petrov
    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. Roberto Wenzel
    Roberto Wenzel avatar
    41 posts
    Member since:
    Sep 2012

    Posted 24 Feb 2012 Link to this post

    Hello Ivan,
    thank you for your reply.
    What I intentially wanted to do is set the panel's background to a semi-transparent color.
    I thought I could do that with the opacity property but I was wrong.

    Setting the opacity value woks as following:
    1. step: in the RadPanel FillPrimitive area set BackColor to some color other than transparent.
    2. step: Set NumberOfColors to 1
    3. step: adjust Opacity to a value between 0.0 and 1.
    I guess there is no easy way to get a semi transparent panel through which I can see the underlying controls?

    Cheers Roberto
  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 29 Feb 2012 Link to this post

    Hi Roberto,

    Thank you for your reply.

    As I said in my previous post, there is no transparency in the WinForms technology. There is no way a control can know what the colors, of the other controls in its parent, underneath it are. Here is an article which demonstrates how to build your own transparent panel, but this is not something covered by out support, so you will have to find another channel for help if you find any difficulties.

    I hope you will find this useful. If you have other questions related to our controls, feel free to ask.

    All the best,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  6. Abhi
    Abhi avatar
    2 posts
    Member since:
    Mar 2015

    Posted 04 Mar in reply to Ivan Petrov Link to this post

    still not working....making panel semi transparent .....setting opacity not working
  7. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 08 Mar Link to this post

    Hello Abhi,

    Thank you for writing.

    You can achieve a semi-transparent color for RadPanel by specifying the alpha component of the Color. Please refer to the attached screenshots illustrating the difference. Have in mind that Form.BackColor is set to Color.Red.

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready