Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Canvas color (Read 3053 times)
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Canvas color
May 21st, 2019 at 5:32am
Print Post  
Hi How can I change the background color of canvas on which diagrams are created? I have attached the picture for reference please help me. Thanks
  

flowchart_002.bmp ( 292 KB | 166 Downloads )
flowchart_002.bmp
Back to top
AIM  
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Canvas color
Reply #1 - May 21st, 2019 at 7:09am
Print Post  
Set the Diagram.BackBrush property.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Canvas color
Reply #2 - May 22nd, 2019 at 3:08am
Print Post  
Please tell me how to use it.
  
Back to top
AIM  
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Canvas color
Reply #3 - May 22nd, 2019 at 3:10am
Print Post  
I am using in the following way in js but giving error
diagram.BackBrush = new SolidBrush(Color.White);

Solidbrush is not defined.
  
Back to top
AIM  
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Canvas color
Reply #4 - May 22nd, 2019 at 5:17am
Print Post  
Hi,

This is a server-side property and is defined in the code-behind or your controller.
Code
Select All
diagram.BackBrush = new MindFusion.Drawing.SolidBrush(System.Drawing.Color.White); 



Defining a background on the client-side (in javascript) doesn't guarantee that it will persist in a MVC application scenario.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Canvas color
Reply #5 - May 23rd, 2019 at 2:54am
Print Post  
okay, please tell me how to achieve it from client side?
  
Back to top
AIM  
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Canvas color
Reply #6 - May 23rd, 2019 at 11:18am
Print Post  
The client-side equivalent is the diagram's BackBrush property.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint