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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDIUtils.CalculateCenter

Thread ID:

Created:

Updated:

Platform:

Replies:

99992 Jun 24,2011 10:21 AM Jun 29,2011 04:36 AM Windows Forms 1
loading
Tags: HTMLUIControl
Randolph Webb
Asked On June 24, 2011 10:21 AM

Hello Vallarasu

I have a question about the GDIUtils.CalculateCenter
DOC DESCRIPTION: Calculates X and Y coordinates to place object at the center of the rectangle.

- Is there a sample demonstrating usage
- I’m assuming that knowing the center means knowing the rectangle… how do I get the html element rectangle’s size (width and height) and left/top (X and Y position)
o relative to the visible control
o relative to the html document width and height

Thanks,

Randolph


Iniyen M A [Syncfusion]
Replied On June 29, 2011 04:36 AM

Hi Randolph,

Thanks for your interest in Syncfusion products.

CalculateCenter(Rectangle rect, Size sz) is point class which returns the Point with X and Y coordinates of center

Parameter "rect" resembles Destination rectangle and "sz" Object size.

For more information i have included the code snippet as follows.

Point pt = Syncfusion.HTMLUI.Base.Utility.GDIUtils.CalculateCenter(this.ClientRectangle, this.ClientSize);

Kindly refer the sample "Element Coordinates" to get the elements Width and height.

Please Let us know if you need further assistance.

Regards,
Iniyen M.A.


CONFIRMATION

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.

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

;