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

Annotation offset in SFDiagram has stopped working

Hi,

I have noticed that the offset for Annotations in the SFDiagram has stopped working. I am using the latest version of the  DLL's from  Nuget v16.4.0.48.

The annotations now appear to ignore any offset and just put the annotation in the center.

The code I am using is as per the doc page https://help.syncfusion.com/wpf/sfdiagram/annotation?cs-save-lang=1&cs-lang=csharp

e.g. new AnnotationEditorViewModel()
                {
                    Offset=new Point(.1,.1),

I have attached some sample code. I modified the Sequence Diagram sample code to use annotation offset, all the  annotations should appear to the left but are showing in the center.

See line 140 in the main windows.xaml.cs where I have added the offset code. 

This did work in eailer versions of the SfDiagram dll, but is now broken.

Any ideas?

Thanks
Daniel

Attachment: Sequence_Diagram_de291542.zip

3 Replies

RT Ramya Thirugnanam Syncfusion Team January 29, 2019 06:21 AM UTC

Hi Daniel, 
 
Please use Length property of annotation for aligning the connector annotation.  Since, we have deprecated the “Offset” property of the annotation. We have mentioned  the same in below release notes link. 
 
To make annotation work: 
Please remove the “Offset” related code and use Length as “0.1” to get annotation alignment as per your requirement.  The Length property work based on Pivot property of Annotation. The (0.5,0.5) is the default value of the Pivot. 
 
Code changes: 
   // Remove this Code 
   //Offset = new Point(.1,.1), 
   Length = 0.1 
 
 
 
 
We will update the documentation with proper and latest feature information. This change will be available from our Volume 1 2019 which is scheduled to be rolled out on  March 2019. 
Regards, 
Ramya T 



DP Daniel Pamich January 29, 2019 09:43 AM UTC

It all works now. Thanks for the help and quick answer.


RT Ramya Thirugnanam Syncfusion Team January 29, 2019 11:08 AM UTC

Hi Daniel,  
 
Thanks for your update. 
 
Regards, 
Ramya T 


Loader.
Live Chat Icon For mobile
Up arrow icon