Forms2OleControlEnabled Property |
Namespace: Aspose.Words.Drawing.Ole
Document doc = new Document(MyDir + "ActiveX controls.docx"); // Get ActiveX control from the document Shape shape = (Shape) doc.GetChild(NodeType.Shape, 0, true); OleControl oleControl = shape.OleFormat.OleControl; Assert.AreEqual(null, oleControl.Name); // Get ActiveX control properties if (oleControl.IsForms2OleControl) { Forms2OleControl checkBox = (Forms2OleControl) oleControl; Assert.AreEqual("Первый", checkBox.Caption); Assert.AreEqual("0", checkBox.Value); Assert.AreEqual(true, checkBox.Enabled); Assert.AreEqual(Forms2OleControlType.CheckBox, checkBox.Type); Assert.AreEqual(null, checkBox.ChildNodes); }