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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Alignment of lebel to TOP Left

Thread ID:





89822 Sep 8,2009 09:08 AM UTC Sep 10,2009 03:59 AM UTC WinForms 1
Tags: Diagram
Nikhil Nirmal
Asked On September 8, 2009 09:08 AM UTC


I am using the sync fusion diagram control version (

I am using the symbol rectangle, in that symbol I want to add text so, I add label to that symbol and assign the text to that label.

Code e.g.

SymbolRectangle SymbolRectInput = new SymbolRectangle();

SymbolRectInput.Size = new SizeF(SymbolWidth, symbolHeight);

Syncfusion.Windows.Forms.Diagram.Label lblnameInput = new Syncfusion.Windows.Forms.Diagram.Label();



SymbolRectInput.Labels[0].Text = strtextName;


Label of Text in Symbol is Center align. But I want that to Top Left align
Please help me, how to align label text to top left in symbol rectangle.

Aling Text_8ccc4449.zip

Gowri Manohari D [Syncfusion]
Replied On September 10, 2009 03:59 AM UTC

Hi Nikhil,

Thank you for choosing Syncfusion products.

Diagram label supports the Position property in order to position the label inside the node. Please refer the code snippet for more details.

Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.
Rectangle(50, 50, 150, 250);
Syncfusion.Windows.Forms.Diagram.Label lbl = new Syncfusion.Windows.Forms.Diagram.Label();
lbl.Text = "This is First";
lbl.Position = Position.TopLeft; //Position the label
lbl.UpdatePosition = true;

Here lbl.UpdatePosition property will position the label at exact location.



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