menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedStateItem - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfLoadedStateItem

    Represents the loaded state item.

    Inheritance
    System.Object
    PdfLoadedFieldItem
    PdfLoadedStateItem
    PdfLoadedCheckBoxItem
    PdfLoadedRadioButtonItem
    Inherited Members
    PdfLoadedFieldItem.Bounds
    PdfLoadedFieldItem.Field
    PdfLoadedFieldItem.Location
    PdfLoadedFieldItem.Page
    PdfLoadedFieldItem.Size
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfLoadedStateItem : PdfLoadedFieldItem
    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.

    Declaration
    public PdfColor BackColor { get; set; }
    Property Value
    Type
    PdfColor

    BorderColor

    Gets or sets the border color of the field

    Declaration
    public PdfColor BorderColor { get; set; }
    Property Value
    Type
    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);

    Checked

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

    Declaration
    public bool Checked { get; set; }
    Property Value
    Type
    System.Boolean
    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)

    ForeColor

    Gets or sets the fore color of the field.

    Declaration
    public PdfColor ForeColor { get; set; }
    Property Value
    Type
    PdfColor

    See Also

    PdfLoadedFieldItem
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved