HasSmartArt

Shape.HasSmartArt property

إرجاعحقيقي اذا هذاShape يحتوي على كائن SmartArt.

public bool HasSmartArt { get; }

أمثلة

يوضح كيفية حساب عدد الأشكال في مستند باستخدام كائنات SmartArt.

Document doc = new Document(MyDir + "SmartArt.docx");

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

Assert.AreEqual(2, numberOfSmartArtShapes);

أنظر أيضا