The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
IMIniyen M A Syncfusion Team June 29, 2011 08:36 AM UTC
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.