Checked

CheckBoxControl.Checked property

Gets or sets a boolean value indicating either this CheckBoxControl is checked or not. The default value is false.

public bool Checked { get; set; }

Examples

Shows how to change state of the CheckBox control.

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.That(checkBoxControl.Checked, Is.EqualTo(true));
Assert.That(checkBoxControl.Type, Is.EqualTo(Forms2OleControlType.CheckBox));

See Also