PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
How to make shading fill whole cell ? (Migradoc) https://forum.pdfsharp.net/viewtopic.php?f=2&t=3126 |
Page 1 of 1 |
Author: | PRNT [ Thu Jun 11, 2015 10:27 am ] | ||
Post subject: | How to make shading fill whole cell ? (Migradoc) | ||
Hi. I have a table in Migradoc and I am making a cell span two rows and putting text into it, then setting a background shading. However, the shading only covers the text whereas I want it to fill the whole (double-height) cell. Code: cell.MergeDown=1; Paragraph paragraph = cell.AddParagraph(); cell.Format.Shading.Color = new Color(0, 176, 80); paragraph.AddFormattedText("Hello world"); The output is attached (I've had to redact the text). The green box on the right should be the same height as the one on the left.
|
Author: | Thomas Hoevel [ Thu Jun 11, 2015 11:00 am ] |
Post subject: | Re: How to make shading fill whole cell ? (Migradoc) |
Hi! A search for "cell shading" found the answer here: viewtopic.php?p=8053#p8053 You need (without ".Format"): Code: cell.Shading.Color = new Color(0, 176, 80);
|
Author: | PRNT [ Thu Jun 11, 2015 11:43 am ] |
Post subject: | Re: How to make shading fill whole cell ? (Migradoc) |
Thomas Hoevel wrote: Hi! A search for "cell shading" found the answer here: viewtopic.php?p=8053#p8053 You need (without ".Format"): Code: cell.Shading.Color = new Color(0, 176, 80); Thanks Thomas, that is the answer ![]() |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |