New to Telerik Document ProcessingStart a free 30-day trial

Collection for managing interactive form fields in a PDF document; add, remove, look up by name, and enumerate fields.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.InteractiveForms

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public class FormFieldCollection : IEnumerable<FormField>, IEnumerable

Inheritance: objectFormFieldCollection

Implements: IEnumerableIEnumerable<FormField>

Methods

Add the specified form field to the collection.

C#
public void Add(FormField field)
Parameters:fieldFormField

The field to be added.

Create a checkbox field with the specified name, add it to the collection, and return it.

C#
public CheckBoxField AddCheckBox(string fieldName)
Parameters:fieldNamestring

The unique name for the new checkbox field.

Returns:

CheckBoxField

The newly created and added checkbox field.

Create a combo box field with the specified name, add it to the collection, and return it.

C#
public ComboBoxField AddComboBox(string fieldName)
Parameters:fieldNamestring

The unique name for the new combo box field.

Returns:

ComboBoxField

The newly created and added combo box field.

Create a comb text box field with the specified name, add it to the collection, and return it.

C#
public CombTextBoxField AddCombTextBox(string fieldName)
Parameters:fieldNamestring

The unique name for the new comb text box field.

Returns:

CombTextBoxField

The newly created and added comb text box field.

Create a list box field with the specified name, add it to the collection, and return it.

C#
public ListBoxField AddListBox(string fieldName)
Parameters:fieldNamestring

The unique name for the new list box field.

Returns:

ListBoxField

The newly created and added list box field.

Create a push button field with the specified name, add it to the collection, and return it.

C#
public PushButtonField AddPushButton(string fieldName)
Parameters:fieldNamestring

The unique name for the new push button field.

Returns:

PushButtonField

The newly created and added push button field.

Create a radio button field with the specified name, add it to the collection, and return it.

C#
public RadioButtonField AddRadioButton(string fieldName)
Parameters:fieldNamestring

The unique name for the new radio button field.

Returns:

RadioButtonField

The newly created and added radio button field.

Create a signature field with the specified name, add it to the collection, and return it.

C#
public SignatureField AddSignature(string fieldName)
Parameters:fieldNamestring

The unique name for the new signature field.

Returns:

SignatureField

The newly created and added signature field.

Create a text box field with the specified name, add it to the collection, and return it.

C#
public TextBoxField AddTextBox(string fieldName)
Parameters:fieldNamestring

The unique name for the new text box field.

Returns:

TextBoxField

The newly created and added text box field.

Return whether a field with the specified name exists in the collection.

C#
public bool Contains(string fieldName)
Parameters:fieldNamestring

Name of the field.

Returns:

bool

true if a field with the specified name exists; otherwise, false.

Return an enumerator that iterates through the form fields.

C#
public IEnumerator<FormField> GetEnumerator()
Returns:

IEnumerator<FormField>

The enumerator.

Implements: IEnumerable<FormField>.GetEnumerator()

Remove the specified form field from the collection and clean up its event subscriptions.

C#
public void Remove(FormField field)
Parameters:fieldFormField

The form field to remove from the collection.

Rename a form field from an old name to a new unique name that meets naming rules.

C#
public void Rename(string oldName, string newName)
Parameters:oldNamestring

The current name of the field to rename.

newNamestring

The new name to assign to the field.

Exceptions:

ArgumentException

Thrown when the old name or new name is null or empty, when no field with the old name exists, when the new name is already used by another field, or when the new name contains a period character.

Properties

The number of form fields contained in the collection.

C#
public int Count { get; }

Get the form field with the specified name from the collection.

C#
public FormField this[string fieldName] { get; }
Parameters:fieldNamestring

The unique name of the form field to retrieve.

Property Value:

The form field with the specified name.

Exceptions:

KeyNotFoundException

Thrown when no field with the specified name exists in the collection.