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

DiagramNodeAnnotation does not support line breaks

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 < br / > or Enviroment.NewLine,
but it seems like that this is currently not supported.

            var displayTitle = "myodetitle"; 

            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

5 Replies

NG Naganathan Ganesh Babu Syncfusion Team February 11, 2020 11:46 AM UTC

Hi Manuel, 

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

Code example: 

var displayTitle = "my\rode\rtitle"; 

Naganathan K G 

MA Manuel February 12, 2020 05:22 PM UTC

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

AR Aravind Ravi Syncfusion Team 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 

GG Gowtham Gunashekar Syncfusion Team 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 

SG Shyam G Syncfusion Team 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  

Live Chat Icon For mobile
Up arrow icon