ApiExamples.ExDocument.TestNodeChangingInDocument C# (CSharp) Метод

TestNodeChangingInDocument() публичный Метод

public TestNodeChangingInDocument ( ) : void
Результат void
        public void TestNodeChangingInDocument()
        {
            // Create a blank document object
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            // Set up and pass the object which implements the handler methods.
            doc.NodeChangingCallback = new HandleNodeChangingFontChanger();

            // Insert sample HTML content
            builder.InsertHtml("<p>Hello World</p>");

            doc.Save(MyDir + @"\Artifacts\Document.FontChanger.doc");

            // Check that the inserted content has the correct formatting
            Run run = (Run)doc.GetChild(NodeType.Run, 0, true);
            Assert.AreEqual(24.0, run.Font.Size);
            Assert.AreEqual("Arial", run.Font.Name);
        }
ExDocument