Hello,
I am working on a WPF project and using syncfusion DocIO I am creating a table in a word Document. I am a beginner and I don't manage to change the fontsize of all the cells of my table. Is textRange.CharacterFormat.FontSize available for the paragraphs I added on my cells ? I have tried without succees. Below, an extract of my code :
private WTable InsererTableau(WordDocument document)
{
WTable tableauRdc = new WTable(document);
tableauRdc.Description = "Relevé de carrière passées et futures";
tableauRdc.TableFormat.IsAutoResized = true;
tableauRdc.TableFormat.HorizontalAlignment = RowAlignment.Center;
tableauRdc.TableFormat.Paddings.All = 5;
tableauRdc.TableFormat.Borders.LineWidth = 1f;
tableauRdc.TableFormat.Borders.Color = Color.Orange;
tableauRdc.ApplyStyleForHeaderRow = true;
if (Item.AnneeCarriere != null)
{
WTableRow row = tableauRdc.AddRow();
row.IsHeader = true;
row.RowFormat.BackColor = Color.WhiteSmoke;
WTableCell cell = row.AddCell();
cell.AddParagraph().AppendText("Année");
cell = row.AddCell();
cell.AddParagraph().AppendText("Régime");
cell = row.AddCell();
cell.AddParagraph().AppendText("Revenu annuel");
cell = row.AddCell();
cell.AddParagraph().AppendText("Nb de trimestres");
cell = row.AddCell();
cell.AddParagraph().AppendText("Nb de points Arrco");
cell = row.AddCell();
cell.AddParagraph().AppendText("Nb de points Agirc");
cell = row.AddCell();
cell.AddParagraph().AppendText("Nb de points autres");
foreach (WTableCell cel in row.Cells)
{
cel.CellFormat.VerticalAlignment = VerticalAlignment.Middle;
cel.CellFormat.Paddings.All = 0;
foreach (WParagraph paragraph in cel.Paragraphs)
{
paragraph.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center;
}
}
Could anyone be so kind to help me ?
Thanks in advance for your answers.
Kind regards
Beatrice