ApiExamples.ExTable.FixDefaultTableWidthsInAw105 C# (CSharp) Метод

FixDefaultTableWidthsInAw105() приватный Метод

private FixDefaultTableWidthsInAw105 ( ) : void
Результат void
        public void FixDefaultTableWidthsInAw105()
        {
            //ExStart
            //ExId:FixTablesDefaultFixedColumnWidth
            //ExSummary:Shows how to revert the default behaviour of table sizing to use column widths.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            // Keep a reference to the table being built.
            Table table = builder.StartTable();

            // Apply some formatting.
            builder.CellFormat.Width = 100;
            builder.CellFormat.Shading.BackgroundPatternColor = Color.Red;

            builder.InsertCell();
            // This will cause the table to be structured using column widths as in previous verisons
            // instead of fitted to the page width like in the newer versions.
            table.AutoFit(AutoFitBehavior.FixedColumnWidths); 

            // Continue with building your table as usual...
            //ExEnd
        }