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

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

private SetTableBordersAll ( ) : void
Результат void
        public void SetTableBordersAll()
        {
            //ExStart
            //ExFor:Table.SetBorders
            //ExId:TableBordersAll
            //ExSummary:Shows how to build a table with all borders enabled (grid).
            Document doc = new Document(MyDir + "Table.EmptyTable.doc");
            Table table = (Table)doc.GetChild(NodeType.Table, 0, true);

            // Clear any existing borders from the table.
            table.ClearBorders();

            // Set a green border around and inside the table.
            table.SetBorders(LineStyle.Single, 1.5, Color.Green);

            doc.Save(MyDir + @"\Artifacts\Table.SetAllBorders.doc");
            //ExEnd

            // Verify the borders were set correctly.
            doc = new Document(MyDir + @"\Artifacts\Table.SetAllBorders.doc");
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Top.Color.ToArgb());
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Left.Color.ToArgb());
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Right.Color.ToArgb());
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Bottom.Color.ToArgb());
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Horizontal.Color.ToArgb());
            Assert.AreEqual(Color.Green.ToArgb(), table.FirstRow.RowFormat.Borders.Vertical.Color.ToArgb());
        }