Articles in this section
Category / Section

How do I set custom position for a Label?

1 min read

Custom position for a label

We can adjust the label position by setting the Position as Custom type. Then we have to set the Offset values for the X,Y co-ordinates to specify the label position.

C#

// Setting custom position for a label
outerRect.Labels.Add(new Syncfusion.Windows.Forms.Diagram.Label());
outerRect.Labels[0].Text = "Rectangle";
outerRect.Labels[0].Position = Position.Custom;
outerRect.Labels[0].OffsetX = 50;
outerRect.Labels[0].OffsetY= 65;

 

VB

''Setting custom position for a label
outerRect.Labels.Add(New Syncfusion.Windows.Forms.Diagram.Label())
outerRect.Labels(0).Text = "Rectangle"
outerRect.Labels(0).Position = Position.Custom
outerRect.Labels(0).OffsetX = 50
outerRect.Labels(0).OffsetY= 65

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied