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

Panel opacity

9 Answers 938 Views
Panel
This is a migrated thread and some comments may be shown as answers.
Roberto Wenzel
Top achievements
Rank 2
Roberto Wenzel asked on 18 Feb 2012, 06:49 PM
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

9 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 24 Feb 2012, 10:54 AM
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 >>
0
Roberto Wenzel
Top achievements
Rank 2
answered on 24 Feb 2012, 01:31 PM
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
0
Ivan Petrov
Telerik team
answered on 29 Feb 2012, 12:12 PM
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 >>
0
Abhi
Top achievements
Rank 2
answered on 04 Mar 2016, 06:26 PM
still not working....making panel semi transparent .....setting opacity not working
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Mar 2016, 10:13 AM
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
0
Diego
Top achievements
Rank 1
answered on 26 Apr 2017, 05:12 PM

Hi Dess i know it is really an old post but RadPanel dosen't work. Do you have a simple project to show backColor and color property?

Thanks.

Diego

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Apr 2017, 07:07 AM
Hello Diego, 

Thank you for writing.  

I have attached a sample project for your reference which demonstrated how to achieve a semi-transparent color. The result is illustrated in the attached screenshot. 

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Diego
Top achievements
Rank 1
answered on 28 Apr 2017, 07:58 AM

Have you tried to put some content behind panel? i have modified your project without no success.

Could you please just give me an advice about that?

So thanks.

Diego

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Apr 2017, 08:24 AM
Hello Diego, 

Thank you for writing back. 

Note that a control can be transparent only compared to its parent. In that sense, there is no straightforward way to make the buttons/labels or other controls under RadPanel visible. Simply, they are siblings to the child panel rather than its parents. Microsoft has published a KB article which can help you in this regard: WinForms: How to create a control transparent to other controls.

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Panel
Asked by
Roberto Wenzel
Top achievements
Rank 2
Answers by
Ivan Petrov
Telerik team
Roberto Wenzel
Top achievements
Rank 2
Abhi
Top achievements
Rank 2
Dess | Tech Support Engineer, Principal
Telerik team
Diego
Top achievements
Rank 1
Share this question
or