StoryStoryType Property |
Namespace: Aspose.Words
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Use a DocumentBuilder to insert a shape // This is an inline shape, which has a parent Paragraph, which is in turn a child of the Body builder.InsertShape(ShapeType.Cube, 100.0, 100.0); Assert.AreEqual(1, doc.GetChildNodes(NodeType.Shape, true).Count); // We can delete all such shapes from the Body, affecting all child Paragraphs Assert.AreEqual(StoryType.MainText, doc.FirstSection.Body.StoryType); doc.FirstSection.Body.DeleteShapes(); Assert.AreEqual(0, doc.GetChildNodes(NodeType.Shape, true).Count);