[]
Represents CheckBox AcroForm field.
public class CheckBoxField : Field, IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef
Initializes a new instance of the CheckBoxField class.
public CheckBoxField()
Gets or sets the value of this CheckBoxField as a Boolean value. See ValueObj for details.
public bool Checked { get; set; }
Gets or sets the default value of this CheckBoxField as a Boolean value. See ValueObj for details.
public bool DefaultChecked { get; set; }
Gets or sets the default value of this CheckBoxField.
[Obsolete("Use the DefaultChecked property instead.")]
public bool DefaultValue { get; set; }
Gets or sets the default value of this CheckBoxField. See ValueObj for details.
public object DefaultValueObj { get; set; }
Gets or sets an array of strings containing one entry for each widget annotation. defining export values for its constituent check boxes. See the PDF spec for details.
public string[] Opt { get; set; }
Gets or sets the value of this CheckBoxField.
[Obsolete("Use the Checked property instead. See also the ValueObj property.")]
public bool Value { get; set; }
Gets or sets the object value of this checkbox field.
Gets false if none of the associated widgets is checked. Otherwise gets true if all widgets use the same name for the checked appearance stream, or the name of the appearance stream that is used to display the checked state.
When set, if a Boolean value is specified, it is assigned as is to the checked state. If the assigned value is not a Boolean, it is converted to string and is interpreted as the name of the widget's appearance stream used to show the widget's checked state. If no such stream exists, the checkbox will show as unchecked.public object ValueObj { get; set; }
Gets the WidgetAnnotation defining view properties of the CheckBoxField.
public WidgetAnnotation Widget { get; }
Gets the name of a widget annotation's appearance stream that is used to display the widget in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.
public string GetCheckedAppearanceStreamName(WidgetAnnotation wa)
wa
WidgetAnnotationOne of WidgetAnnotations associated with this field.
The name of the widget annotation's appearance stream that is used to display the widget in checked state.
Gets the names of appearance streams of the widget annotations associated with this field that are used to display the widgets in checked state. In Acrobat these names are specified as "Export Value" option in the Check Box field properties.
public string[] GetCheckedAppearanceStreamNames()
The names of the widget annotations' appearance streams that are used to display the widgets in checked state.
Checks whether this CheckBoxField actually behaves as a RadioButtonField. This situation takes place if the checkbox field owns more than one WidgetAnnotations, and the widgets' appearance streams used to show checked state have different names.
public bool HasRadioButtonBehavior()
true if this checkbox behaves as a radio button, false otherwise.
Sets the name of a widget annotation's appearance stream that will be used to display the widget in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.
public void SetCheckedAppearanceStreamName(WidgetAnnotation wa, string name)
wa
WidgetAnnotationOne of WidgetAnnotations associated with this field.
name
stringThe name of the appearance stream to use for checked state.
Sets the name of an appearance stream that will be used by the widget annotations associated with this field to display the widgets in checked state. In Acrobat this name is specified as "Export Value" option in the Check Box field properties.
public void SetCheckedAppearanceStreamNames(string name)
name
stringThe name of the appearance stream to use for checked state.