MigraDoc C# Aligner à gauche et à droite sur la même ligne

J'ai une table avec une cellule où j'en veux deux textes, le premier, aligné sur la gauche et la deuxième aligné sur la droite, dans la même cellule, sur la même ligne.

J'ai essayé de reproduire cette cellule avec MigraDoc sans succès. Je ne peux ajouter deux textes alignés à gauche et à droite, mais pas sur la même ligne.

Voici mon code:

Cell cellFooter1 = rowFooter.Cells[0];
Paragraph paraphTot = new Paragraph();
paraphTot.Format.Alignment = ParagraphAlignment.Left;
paraphTot.AddText("Left text");
cellFooter1.Add(paraphTot);
Paragraph paraphDetails = new Paragraph();
paraphDetails.Format.Alignment = ParagraphAlignment.Right;
paraphDetails.AddText("Right text");
cellFooter1.Add(paraphDetails);

Une solution qui est présenté ici (http://forum.pdfsharp.net/viewtopic.php?f=2&t=2373) mais je ne suis pas capable de faire de même avec ma table. Je ne comprends pas la façon dont il fonctionne.

Edit : solution Partielle :

Après un dur travail pour comprendre comment ça marche, mon code est partiellement de travail. partielle, car le seul moyen que j'ai trouvé pour aligner à droite est de créer une Tabulation avec une approximation de la valeur... pas bien.

Table table = new Table();
table.Borders.Width = 0.75;
Column myColumn = table.AddColumn(Unit.FromCentimeter(7));
Row myRow = table.AddRow();
Cell myCell = myRow.Cells[0];
Paragraph myParagraph = new Paragraph();
Style myStyle = doc.AddStyle("myStyle", "Normal");
myStyle.ParagraphFormat.Font.Size = 6.5;
myStyle.ParagraphFormat.Font.Bold = true;
myStyle.ParagraphFormat.TabStops.Clear();
myStyle.ParagraphFormat.AddTabStop(Unit.FromMillimeter(67), TabAlignment.Right);
myParagraph.Style = "myStyle";
myParagraph.Format.Alignment = ParagraphAlignment.Left;
myParagraph.AddFormattedText("left", "myStyle");
myParagraph.AddTab();
myParagraph.AddFormattedText("right", "myStyle");
myCell.Add(myParagraph);

Ce travail, mais comment trouver la bonne valeur pour l'AddTab fonction ? J'ai mis 67 parce que 68to70 ne fonctionne pas.

OriginalL'auteur Alex Saesee | 2013-05-27