We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Transparent background

Is there a way to have the background of the digramming tool to be set to transparent? I dont need white or background image, i need transparent. Thanks John

6 Replies

MF Meera Fathima Syncfusion Team October 31, 2005 06:29 AM UTC

Hello John, You can accomplish this by setting Diagram.Model.BackgroundStyle.Color to Transparent. Please let me know if you have any queries on this issue. Thanks for your interest in Syncfusion. Regards, Meera.


PC Per Cramer March 24, 2021 10:49 AM UTC

Sorry to bring back such an old post. But is i then save the diagram as a png, would that then also have an transparent background?


GG Gowtham Gunashekar Syncfusion Team March 25, 2021 02:48 PM UTC

Hi John,  
 
We can export the diagram as PNG image with transparent Background, if we set the Diagram.Model.BackgroundStyle.Color as transparent. We have added sample location for the sample to export the diagram as image. 
 
Sample Location: C:\Users\Public\Documents\Syncfusion\Windows\{Version}\diagram\Getting Started\Export Image 
 
Regards  
Gowtham 



PC Per Cramer July 14, 2022 08:41 AM UTC

Hi,

I tried this and it doesn't work. It seems to set the background color to a gray and photoshop etc also don't show it as transparent (it shows up as the same gray).

Regards,


Per



DT Deepa Thiruppathy Syncfusion Team July 15, 2022 01:24 PM UTC

Hi Per,


Reported issue: Transparent background color is not exporting properly


We are able to reproduce the issue. We are validating the issue and will update you with more details on July 19, 2022.


Regards,

Deepa Thiruppathy



PP Prakash Perumal Syncfusion Team July 19, 2022 06:58 PM UTC

Hi Per,


We request you to update the BackColor property of diagram control to export diagram with Transparent background in addition to updating model’s BackgroundStyle property. Please find the code example below:


this.diagram1.BackColor = Color.Transparent;

this.diagram1.Model.BackgroundStyle.Color = Color.Transparent;


Sample: https://www.syncfusion.com/downloads/support/forum/36438/ze/ExportDiagram938750747


Regards,

Prakash


Loader.
Live Chat Icon For mobile
Up arrow icon