ShapeHasSmartArt Property

Returns true if this Shape has a SmartArt object.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 22.1.0

ExpandedSyntax

public bool HasSmartArt { get; }

Property Value

Type: Boolean

ExpandedExamples

Shows how to count the number of shapes in a document with SmartArt objects.
Document doc = new Document(MyDir + "SmartArt.docx");

int numberOfSmartArtShapes = doc.GetChildNodes(NodeType.Shape, true).Cast<Shape>().Count(shape => shape.HasSmartArt);

Assert.AreEqual(2, numberOfSmartArtShapes);

ExpandedSee Also