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

Converting a node''s MeasurementUnits

Thread ID:





78549 Dec 17,2008 10:38 PM UTC Dec 21,2008 09:19 PM UTC WinForms 2
Tags: Diagram
Ron Alan Sawyer
Asked On December 17, 2008 10:38 PM UTC

I am saving a diagram to a database. All was working well until I found that if you change a diagram's measurement units in the middle of creating a diagram, the nodes will all have different measurement units.

e.g. I start with a diagram whose measurement unit is pixels. I lay down two nodes. They both have measurement units as pixels. I then change the diagram's measurement units to inches and lay down another node. It's new measurement unit is now inches.

I want to store them all as with pixel measurement unit.

How do I convert?

Ajeet M [Syncfusion]
Replied On December 18, 2008 01:32 PM UTC


You can set your nodes properties as follows when you want that their MeasureUnits should never change.

Node some_node;

some_node.MeasurementUnit = MeasureUnits.Inch;
some_node.InheritContainerMeasureUnits = false;


The above code will ensure that the MeasureUnit for the Node "some_node" will always remain to "Inch" irrespective of Model's MeasureUnits.

Attached with this mail is my sample file for the same.

Let me know if you shall need any further clarifications here.

Happy Coding!



Ron Alan Sawyer
Replied On December 21, 2008 09:19 PM UTC

Thank you, this fixed my problem.


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