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 03:46 AM

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"; 
 

Regards, 
 
Naganathan K G 



MA Manuel February 12, 2020 09:22 AM

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


AR Aravind Ravi Syncfusion Team February 13, 2020 05:27 AM

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.   
  
   
Regards,   
Aravind Ravi 



GG Gowtham Gunashekar Syncfusion Team March 4, 2020 06:01 AM

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. 
 
 
Regards, 
Gowtham G 
 



SG Shyam G Syncfusion Team March 11, 2020 03:44 PM

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.         
  
Regards,  
Shyam G  


Loader.
Live Chat Icon For mobile
Up arrow icon