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

Multiline text - Label in diagram

how to set label text in multiple line in syncfusion diagrm


1 Reply

SS Sri Subhashini M Syncfusion Team November 20, 2007 07:30 AM UTC

Hi,

My apologies for the delay in responding to you.

I was able to view the condition you have described here. We can set multiline text to the label by adding new line characters in the Label text.

Kindly review the code snippet,

// Creating Rectangle Node
Rectangle rect = new Rectangle(20, 100, 250, 250);
// Setting multiline text
rect.Labels.Add(new Label(rect, "MultiLine Label Text"));
rect.Labels[0].FontStyle.Bold = true;

rect.FillStyle.Color = Color.LightBlue;
this.diagram1.Model.AppendChild(rect);

Please take a look at the sample and let me know if it helps.

http://websamples.syncfusion.com/samples/Diagram.Windows/69871/main.htm

Regards,
Suba


Loader.
Live Chat Icon For mobile
Up arrow icon