menu

Xamarin.Android

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

    Show / Hide Table of Contents

    Class PdfLoadedChoiceField

    Represents a choice field of an existing PDF document.

    Inheritance
    System.Object
    PdfField
    PdfLoadedField
    PdfLoadedStyledField
    PdfLoadedChoiceField
    PdfLoadedComboBoxField
    PdfLoadedListBoxField
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfField.DisableAutoFormat
    PdfField.Flatten
    PdfField.GetValue(String)
    PdfField.Initialize()
    PdfField.Layer
    PdfField.PdfTag
    PdfField.PropertyChanged
    PdfField.SetValue(String, String)
    PdfField.TabIndex
    PdfLoadedField.Export
    PdfLoadedField.Form
    PdfLoadedField.MappingName
    PdfLoadedField.Name
    PdfLoadedField.ObjectID
    PdfLoadedField.Page
    PdfLoadedField.ReadOnly
    PdfLoadedField.Required
    PdfLoadedField.SetName(String)
    PdfLoadedField.ToolTip
    PdfLoadedStyledField.BorderColor
    PdfLoadedStyledField.BorderStyle
    PdfLoadedStyledField.BorderWidth
    PdfLoadedStyledField.Bounds
    PdfLoadedStyledField.DefaultIndex
    PdfLoadedStyledField.DefineDefaultAppearance()
    PdfLoadedStyledField.Font
    PdfLoadedStyledField.GetGraphicsProperties(PdfLoadedStyledField.GraphicsProperties, PdfLoadedFieldItem)
    PdfLoadedStyledField.GotFocus
    PdfLoadedStyledField.Location
    PdfLoadedStyledField.LostFocus
    PdfLoadedStyledField.MouseDown
    PdfLoadedStyledField.MouseEnter
    PdfLoadedStyledField.MouseLeave
    PdfLoadedStyledField.MouseUp
    PdfLoadedStyledField.RotationAngle
    PdfLoadedStyledField.Size
    PdfLoadedStyledField.StyleToString(PdfCheckBoxStyle)
    PdfLoadedStyledField.Visibility
    PdfLoadedStyledField.Visible
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfLoadedChoiceField : PdfLoadedStyledField, IPdfWrapper, INotifyPropertyChanged
    Examples
     //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load an existing choice field
    PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
    choiceField.SelectedIndex = 0;
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load an existing Check field
    Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
    choiceField.SelectedIndex = 0
    doc.Save("Form.pdf")
    doc.Close(True)

    Properties

    BackColor

    Get or sets the back color of the field

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

    ForeColor

    Gets or sets the fore color of the field.

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

    SelectedIndex

    Gets or sets the first selected item in the list.

    Declaration
    public int[] SelectedIndex { get; set; }
    Property Value
    Type
    System.Int32[]
    Examples

    An integer value specifying the choice item in the list.

     //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load an existing choice field
    PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
    choiceField.SelectedIndex = new int[] { 0 };
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load an existing Check field
    Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
    choiceField.SelectedIndex = New Integer() {0}
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedStyledField
    PdfLoadedDocument

    SelectedItem

    Gets the selected items in the list.[Read-Only]

    Declaration
    public PdfLoadedListItemCollection SelectedItem { get; }
    Property Value
    Type
    PdfLoadedListItemCollection
    Examples

    A PdfLoadedListItemobject specifying the selected item.

    //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load an existing Check field
    PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
    // Change the selected item
    PdfLoadedListItemCollection items = choiceField.SelectedItem;
    items[0].Text = "New Text";
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load an existing Check field
    Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
    ' Change the selected item
    Dim items As PdfLoadedListItemCollection = choiceField.SelectedItem
    items(0).Text = "New Text"
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedChoiceField

    SelectedValue

    Gets or sets the value of the first selected item in the list.

    Declaration
    public string[] SelectedValue { get; set; }
    Property Value
    Type
    System.String[]
    Examples

    A string value specifying the value of the selected item.

    //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load an existing choice field
    PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
    choiceField.SelectedValue = new string[] { "Employee" };
    doc.Save("Form.pdf"); 
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load an existing choice field
    Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
    choiceField.SelectedValue = New String() { "Employee" }
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedChoiceField

    Values

    Gets the collection of choice items.[Read-Only]

    Declaration
    public PdfLoadedListItemCollection Values { get; }
    Property Value
    Type
    PdfLoadedListItemCollection
    Examples

    A PdfLoadedListItemobject specifying the selected item.

    //Load an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load an existing Check field
    PdfLoadedChoiceField choiceField = doc.Form.Fields["Java"] as PdfLoadedChoiceField;
    // Change the selected item
    PdfLoadedListItemCollection items = choiceField.SelectedItem;
    items[0].Text = "New Text";
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load an existing Check field
    Dim choiceField As PdfLoadedChoiceField = TryCast(doc.Form.Fields("Java"), PdfLoadedChoiceField)
    ' Change the selected item
    Dim items As PdfLoadedListItemCollection = choiceField.SelectedItem
    items(0).Text = "New Text"
    doc.Save("Form.pdf")
    doc.Close(True)

    Methods

    AssignSelectedIndex(Int32[])

    Sets selected index.

    Declaration
    protected void AssignSelectedIndex(int[] value)
    Parameters
    Type Name Description
    System.Int32[] value

    Selected index.

    AssignSelectedValue(String[])

    Sets selected value.

    Declaration
    protected void AssignSelectedValue(string[] values)
    Parameters
    Type Name Description
    System.String[] values

    ObtainSelectedIndex()

    Gets selected index.

    Declaration
    protected int[] ObtainSelectedIndex()
    Returns
    Type Description
    System.Int32[]

    Selected index.

    ObtainSelectedValue()

    Gets selected value.

    Declaration
    protected string[] ObtainSelectedValue()
    Returns
    Type Description
    System.String[]

    Selected value.

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

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