Checked

CheckBoxControl.Checked property

يحصل على قيمة منطقية تشير إلى هذا أو يعينهاCheckBoxControl تم تحديده أم لا. القيمة الافتراضية هيخطأ شنيع .

public bool Checked { get; set; }

أمثلة

يوضح كيفية تغيير حالة عنصر التحكم CheckBox.

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

Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.OleFormat.OleControl;
checkBoxControl.Checked = true;

Assert.AreEqual(true, checkBoxControl.Checked);
Assert.AreEqual(Forms2OleControlType.CheckBox, checkBoxControl.Type);

أنظر أيضا