Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.BackBrush - LoadFromString() (Read 1453 times)
audi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Oct 21st, 2022
Diagram.BackBrush - LoadFromString()
Feb 23rd, 2023 at 3:20am
Print Post  
Hi,

I found that the diagram.BackBrush default color is changed from Color.FromArgb(170, 170, 200) to White color after I upgraded MindFusion.Diagramming from version 6.1.2.23857 to version 6.8.5.450.

You can refer the diagrams of different version in the attachment.

I wonder if this is a expected behavior changed or a bug.
Because when I debug, I found that the property diagram.BackBrush are remained as 'Nothing' in both version after calling LoadFromString() method.
  

6_1_2_23857_version.png ( 2 KB | 39 Downloads )
6_1_2_23857_version.png
6_8_5_450_version.png ( 2 KB | 41 Downloads )
6_8_5_450_version.png
Diagram_BackBrush_default_color.png ( 21 KB | 40 Downloads )
Diagram_BackBrush_default_color.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Diagram.BackBrush - LoadFromString()
Reply #1 - Feb 23rd, 2023 at 9:31am
Print Post  
Hi,

Default value changed to null when we introduced styles and themes, we'll need to update the help file. So when it's null, the actual brush comes from either the current theme or from Diagram.Style if you have set that.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
audi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Oct 21st, 2022
Re: Diagram.BackBrush - LoadFromString()
Reply #2 - Feb 23rd, 2023 at 10:30am
Print Post  
Hi Slavcho,

I check the diagram.Style, it's Nothing. For the theme, do you mean the diagram.Theme? It's Nothing too in my environment. Kindly refer the attachment.

In conclusion, do you mean that by default the back color of the diagram will be White now right?


  

Diagram_Style.png ( 3 KB | 41 Downloads )
Diagram_Style.png
DiagramTheme.png ( 39 KB | 40 Downloads )
DiagramTheme.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Diagram.BackBrush - LoadFromString()
Reply #3 - Feb 23rd, 2023 at 2:15pm
Print Post  
Right, there's stylesheet-like value inheritance (object.brush -> object.style.brush -> diagram.theme.brush -> default_style.brush) and the default is white now:

Code
Select All
static DiagramStyle()
{
	Default = new DiagramStyle();
	Default.BackBrush = new SolidBrush(Color.White);
	Default.FontFamily = "Microsoft Sans Serif";
	Default.FontSize = 9;
	Default.FontStyle = FontStyle.Regular;
	Default.FontUnit = GraphicsUnit.Point;
	Default.Brush = new SolidBrush(Color.White);
	Default.Stroke = new SolidBrush(Color.Black);
	Default.StrokeThickness = 0;
	Default.StrokeDashStyle = DashStyle.Solid;
	Default.ShadowBrush = new SolidBrush(Color.FromArgb(150, Color.DarkGray));
	Default.TextBrush = new SolidBrush(Color.Black);
} 



Regards,
Slavcho
Mindfusion
« Last Edit: Feb 24th, 2023 at 6:50am by Slavcho »  
Back to top
 
IP Logged
 
audi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Oct 21st, 2022
Re: Diagram.BackBrush - LoadFromString()
Reply #4 - Feb 24th, 2023 at 4:53am
Print Post  
Hi Slavcho,

Thank you very much. This clarify my doubt on the default color.
Smiley

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