PdfCheckBoxField Class

A check box (ISO 32000-2, 12.7.5.2.3): a button that is on or off.

public sealed class PdfCheckBoxField : PdfFormField
Inheritance
PdfFormField PdfCheckBoxField

Properties

NameDescription
IsCheckedGets or sets a value indicating whether the box is checked: its value (/V) and the appearance state of its widgets (/AS) are the on state, or Off.
OnValueGets the name of the on state: the appearance state of the widgets that is not Off, such as Yes.
ValueGets or sets the value: the on state when the box is checked, Off otherwise. Setting null or Off unchecks it.

Gets or sets a value indicating whether the box is checked: its value (/V) and the appearance state of its widgets (/AS) are the on state, or Off.

public bool IsChecked { get; set; }

Property value

bool

Exceptions

InvalidOperationException
The field is read-only.

Gets the name of the on state: the appearance state of the widgets that is not Off, such as Yes.

public string OnValue { get; }

Property value

string

Gets or sets the value: the on state when the box is checked, Off otherwise. Setting null or Off unchecks it.

public override string? Value { get; set; }

Property value

string?

Exceptions

ArgumentException
The value is neither the on state nor Off.
InvalidOperationException
The field is read-only.