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

How to move label

Hi

When I drag & drop elipse into diagram control, and double click on it, I see a label.

[IMG]http://img189.imageshack.us/img189/900/elipsei.th.jpg[/IMG]

but how can I move it down?



1 Reply

RT Ramya Thirugnanam Syncfusion Team July 26, 2011 06:46 AM UTC

Hi Wojciech,

With regards to move the label, Label of the Node can be aligned within the Node using LabelHorizontalAlignment and LabelVerticalAlignment. We have provided the code snippet for align the Label for the Drag and Drop Symbol, please refer to the Code Snippet.

Code Snippet:
//Register the Events
diagramView.NodeDrop += new NodeDroppedEventHandler(diagramView_NodeDrop);

//Node Drop event for Customizing the Label Position
void diagramView_NodeDrop(object sender, NodeDroppedRoutedEventArgs evtArgs)
{
Node n = evtArgs.DroppedNode as Node;
n.LabelHorizontalAlignment = HorizontalAlignment.Center;
n.LabelVerticalAlignment = VerticalAlignment.Bottom;
}

For more details about option to customize the Label of Node, please refer to the Online Help Documentation.

Link: http://help.syncfusion.com/ug_92/User%20Interface/WPF/Diagram/index.htm and Navigate to the Concepts and Features->Nodes->Node Label

Please let us know if you have any further queries and we will be happy to help you out.

Regards,
Ramya


Loader.
Live Chat Icon For mobile
Up arrow icon