Table of Contents

Class PdfLoadedStateItem

Namespace
Syncfusion.Pdf.Parsing
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded state item.

public class PdfLoadedStateItem : PdfLoadedFieldItem
Inheritance
PdfLoadedStateItem
Derived
Inherited Members

Examples

//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Getting the 'Gender' radio button field          
PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
// State Item collection
PdfLoadedStateItemCollection stateItemCollection = radiobuttonField.Items;
PdfLoadedStateItem stateItem =stateItemCollection[0];
// Radio button field item
PdfLoadedRadioButtonItem radiobuttonItem = stateItem as PdfLoadedRadioButtonItem;
// Selected the item 
radiobuttonItem.Checked = true;         
doc.Save("LoadedForm.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Getting the  'Gender' radio button field         
Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
' State Item collection
Dim stateItemCollection As PdfLoadedStateItemCollection = radiobuttonField.Items
Dim stateItem As PdfLoadedStateItem = stateItemCollection(0)
' Radio button field item
Dim radiobuttonItem As PdfLoadedRadioButtonItem = TryCast(stateItem, PdfLoadedRadioButtonItem)
' Selected the item 
radiobuttonItem.Checked = True
doc.Save("LoadedForm.pdf")
doc.Close(True)

Properties

BackColor

Gets or sets the back color of the field.

public PdfColor BackColor { get; set; }

Property Value

PdfColor
See Also

BorderColor

Gets or sets the border color of the field

public PdfColor BorderColor { get; set; }

Property Value

PdfColor

Examples

//Load an existing document
PdfLoadedDocument pdfLoadedDocument = new PdfLoadedDocument("Form.pdf");
// Load the form field
PdfField pdfFormField = pdfLoadedDocument.Form.Fields[0];
// Load the Radio Button List field
PdfLoadedRadioButtonListField pdfLoadedRadioButtonList = pdfFormField as PdfLoadedRadioButtonListField;
// Load Radio Button Item
PdfLoadedRadioButtonItem loadedRadioButtonField = pdfLoadedRadioButtonList.Items[0];
// Set the Border color
loadedRadioButtonField.BorderColor = new Syncfusion.Pdf.Graphics.PdfColor(0, 125, 0);
// close the document
pdfLoadedDocument.Close(true);
See Also

Checked

Gets or sets a value indicating whether this PdfLoadedStateItem is checked.

public bool Checked { get; set; }

Property Value

bool

Examples

//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Getting the 'Gender' radio button field          
PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
// State Item collection
PdfLoadedStateItemCollection stateItemCollection = radiobuttonField.Items;
PdfLoadedStateItem stateItem =stateItemCollection[0];
// Radio button field item
PdfLoadedRadioButtonItem radiobuttonItem = stateItem as PdfLoadedRadioButtonItem;
// Selected the item 
radiobuttonItem.Checked = true;         
doc.Save("LoadedForm.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Getting the  'Gender' radio button field         
Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
' State Item collection
Dim stateItemCollection As PdfLoadedStateItemCollection = radiobuttonField.Items
Dim stateItem As PdfLoadedStateItem = stateItemCollection(0)
' Radio button field item
Dim radiobuttonItem As PdfLoadedRadioButtonItem = TryCast(stateItem, PdfLoadedRadioButtonItem)
' Selected the item 
radiobuttonItem.Checked = True
doc.Save("LoadedForm.pdf")
doc.Close(True)
See Also

ForeColor

Gets or sets the fore color of the field.

public PdfColor ForeColor { get; set; }

Property Value

PdfColor
See Also

See Also