The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am trying to create a user control and I want to set its background to be transparent; however, when I do this I get an error "This control does not support transparent background colors." I have been looking around for how to enable transparent backgrounds for a user control with no luck. I have tried a number of things by overriding "OnPaintBackground"; however, none of them have worked and I end up with garbage leaking thru from somewhere else even though the control my user control is a child of has a background.
The reason I want to do this is I am using the syncfusion tab control and I am using themes. I want to be able to place my user control on the tab page and have the theme background show through behind labels and other controls on my user control.
Thank you,
Jon
Try changing the FlatStyle property of your UserControl. I know if you set the FlatStyle of a Label back to Standard when it was System, you can then set a transparent background colour.
ADAdministrator Syncfusion Team April 17, 2005 06:04 PM UTC
>Hi,
>
>I am trying to create a user control and I want to set its background to be transparent; however, when I do this I get an error "This control does not support transparent background colors." I have been looking around for how to enable transparent backgrounds for a user control with no luck. I have tried a number of things by overriding "OnPaintBackground"; however, none of them have worked and I end up with garbage leaking thru from somewhere else even though the control my user control is a child of has a background.
>
>The reason I want to do this is I am using the syncfusion tab control and I am using themes. I want to be able to place my user control on the tab page and have the theme background show through behind labels and other controls on my user control.
>
>
>Thank you,
>Jon
MAMayankJuly 13, 2007 02:20 PM UTC
Hi Rik, I am trying to make background of UserControl transparent, but after trying hard i never found anything which solve it. It seems to me that you are having some clue as per your message like "FlateStyle". Please let me know if you have something which help me to come out from this problem.
Thanks in Advance
>Try changing the FlatStyle property of your UserControl. I know if you set the FlatStyle of a Label back to Standard when it was System, you can then set a transparent background colour.