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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DiagramNodeAnnotation does not support line breaks

Thread ID:





151388 Feb 10,2020 11:39 AM UTC Mar 11,2020 11:44 PM UTC Blazor 5
Tags: Diagram
Asked On February 10, 2020 11:40 AM UTC

I'd like to specify by own where a text should be wrapped in the first place,
than i'd like to take the TextWrapping the rest. So i tried to set a display title
for my diagram node with things like \n < br / > or Enviroment.NewLine,
but it seems like that this is currently not supported.

            var displayTitle = "my\nnode\ntitle"; 

            var style = new AnnotationStyle { Bold = true, FontFamily = "Comic Sans MS", FontSize = 24, TextWrapping = TextWrap.Wrap };

            base.Annotations = new ObservableCollection
                new DiagramNodeAnnotation
                    Content = displayTitle,

                    Width = base.Width - 10,
                    Height = base.Height - 10,

                    Style = style,

                    Constraints = AnnotationConstraints.ReadOnly

Naganathan Ganesh Babu [Syncfusion]
Replied On February 11, 2020 11:46 AM UTC

Hi Manuel, 

We suggest you to use “\r\n” for new line character instead of “\n” for the node annotations. please refer to  the below modified code example. 

Code example: 

var displayTitle = "my\r\nnode\r\ntitle"; 

Naganathan K G 

Replied On February 12, 2020 05:22 PM UTC

Thank you, but this seems not to work. It adds a space only.

Aravind Ravi [Syncfusion]
Replied On February 13, 2020 01:27 PM UTC

Hi Manuel, 
Reported Issue : New Line is not working in Annotation in Blazor 
We can reproduce the issue. We have confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and provide the patch on 3rd March,2020 weekly patch release.   
Now, you can track the status of your issue through below feedback link.   
Aravind Ravi 

Gowtham Gunashekar [Syncfusion]
Replied On March 4, 2020 02:01 PM UTC

Hi Manuel,  
Reported Issue : New Line is not working in Annotation in Blazor  
Because of some technical issues we could not able to move this issue fix to weekly NuGet release. We will include this fix on upcoming weekly NuGet release which will be scheduled on 11th march 2020. However we have provided the custom package link below. 
Gowtham G 

Shyam G [Syncfusion]
Replied On March 11, 2020 11:44 PM UTC

Hi Manuel,  
Reported Issue :  New Line is not working in Annotation in Blazor  
We have fixed the reported issue and included it in our patch release (v17.4.55) which is rolled out successfully.   
Please upgrade to the latest version packages to resolve this issue.         
Shyam G  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon