Hello,
I've made some internal methods accessible so I can access the .LayoutInfoContentArea of my paragraph. Below is a code-snippet that should help to illustrate what I'm facing.
XUnit uColWidth = XUnit.FromCentimeter(5);
docRenderer.RenderObject(gfx, uPreviousColumnWidths.Centimeter, 2.5, uColWidth.Centimeter, nextP);
foreach (MigraDoc.Rendering.RenderInfo ri in rInfos)
{
if (lastP.Tag.ToString() == ri.DocumentObject.Tag.ToString())
{
lastAddedParagraphInfo.Width.Centimeter = ri.LayoutInfo.ContentArea.Width.Centimeter;
...
I am getting the PT value back when explicitly requesting Centimeters. So, I now "understand" to expect a Point return value back and multiply by a value to perform the converstion to my desired unit of measure. However, even the converted value doesn't equal 5cm.
Should I simply not expect the rectanlge to show that it is 5cm in width (or its equivalent Point value) when interrogating the Width property on the fly (via ri.LayoutInfo.ContentArea.Width)?
Also, it seems that retrieving the LayoutInfo.ContentArea.Y and the LayoutInfo.ContentArea.Height coordinates/values is not possible. Is this in/correct?
Update: I thought I would try to determine the height of simple constituent controls so I tried the textFrame.Height property. And no go...It only gives me zeroes...Is this by design??
Many thanks!
Henry
[Setting the Value:]
Attachment:
ValueSetting1.PNG [ 15.27 KiB | Viewed 4756 times ]
[Interrogating the Value:]
Attachment:
ValueSetting2.PNG [ 17.28 KiB | Viewed 4756 times ]
[Retrieving an incorrect/unexpected Value:]
Attachment:
ValueRetrieval.PNG [ 29.59 KiB | Viewed 4756 times ]