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

Rectangle with millimeter values

Thread ID:





82201 Jun 4,2009 07:08 AM UTC Jun 5,2009 12:14 PM UTC WinForms 3
Tags: Diagram
Asked On June 4, 2009 07:08 AM UTC

I am using Diagram control. could u plz help me, how to draw rectangle with millimeter values?

Thanks in advance...

Gowri Manohari D [Syncfusion]
Replied On June 4, 2009 09:18 AM UTC

Hi Mani,

Thanks for choosing Syncfusion Products.

MeasureUnit is one of the argument of Rectangle class. For your requirement we can specify the MeasureUnits as MeasureUnits.Millimeter.The below code illustrate this.

Syncfusion.Windows.Forms.Diagram.Rectangle r = new Syncfusion.Windows.Forms.Diagram.Rectangle(100,50,100, 50, MeasureUnits.Millimeter);

Thanks & Regards,

Replied On June 4, 2009 10:42 AM UTC

can u explain how this measureunits works? how it draws in millimeters instead of pixels?


Gowri Manohari D [Syncfusion]
Replied On June 5, 2009 12:14 PM UTC

Hi Mani,

All the graphics objects are Pixel Based representation units.The Diagram Control also Pixel Based Measurement.So whatever measure unit we specify it will convert to pixel.

For your requirement Measurement.MilliMeter , before drawing rectangle the system will convert into equivalent pixel representation.The below is the method used for conversion.

MeasureUnitsConverter.ToPixels(rectBounds, MeasureUnit.MilliMeter);

Thanks & Regards,


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

or the page will be automatically redirected to 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