To change the alignment of a table, set the FlowAlign property for the table. For example, add the following code to the Form_Load event before the Generate method to center the table on the page:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
table.Style.FlowAlign = FlowAlignEnum.Center |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
table.Style.FlowAlign = FlowAlignEnum.Center; |
|
The table appears centered on the page:
