menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class PdfLoadedListBoxField

    Represents loaded list box field.

    Inheritance
    System.Object
    PdfField
    PdfLoadedField
    PdfLoadedStyledField
    PdfLoadedChoiceField
    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
    PdfLoadedChoiceField.AssignSelectedIndex(Int32[])
    PdfLoadedChoiceField.AssignSelectedValue(String[])
    PdfLoadedChoiceField.BackColor
    PdfLoadedChoiceField.ForeColor
    PdfLoadedChoiceField.ObtainSelectedIndex()
    PdfLoadedChoiceField.ObtainSelectedValue()
    PdfLoadedChoiceField.SelectedIndex
    PdfLoadedChoiceField.SelectedItem
    PdfLoadedChoiceField.SelectedValue
    PdfLoadedChoiceField.Values
    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 PdfLoadedListBoxField : PdfLoadedChoiceField, IPdfWrapper, INotifyPropertyChanged
    Examples
     //Load an existing document
     PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
     // Load the list box field          
     PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
     // Flatten the list field
     listField.Flatten = true;
     doc.Save("Form.pdf");
     doc.Close(true);
     'Load an existing document
     Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
     ' Load the list box field          
     Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
     ' Flatten the list field
     listField.Flatten = True
     doc.Save("Form.pdf")
     doc.Close(True)

    Properties

    ComplexScript

    Gets or sets the complex script language support.

    Declaration
    public bool ComplexScript { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    //Load existing PDF document.
    PdfLoadedDocument ldoc = new PdfLoadedDocument("form.pdf");
    //Load the existing list box field.
    PdfLoadedListBoxField list = lfied as PdfLoadedListBoxField;
    //Create font.
    Font font = new Font("Tahoma", 10f);
    //Create a new PDF font instance.
    PdfFont pdfFont = new PdfTrueTypeFont(font, FontStyle.Regular, 10f, true, true);
    //Set font.
    list.Font = pdfFont;
    //Enable complex script support.
    list.ComplexScript = true;
    ldoc.Form.SetDefaultAppearance(false);
    //Save the document.
    ldoc.Save("output.pdf");
    //Close the document.
    ldoc.Close(true);
    'Load existing PDF document.
    Dim ldoc As New PdfLoadedDocument("form.pdf")
    'Load the existing list box field.
    Dim list As PdfLoadedListBoxField = TryCast(ldoc.Form.Fields(0), PdfLoadedListBoxField)
    'Create font.
    Dim font As New Font("Tahoma", 10F)
    'Create a new PDF font instance.
    Dim pdfFont As PdfFont = New PdfTrueTypeFont(font, FontStyle.Regular, 10F, True, True)
    'Set font.
    list.Font = pdfFont
    'Enable complex script support.
    list.ComplexScript = True
    ldoc.Form.SetDefaultAppearance(False)
    'Save the document.
    ldoc.Save("output.pdf")
    'Close the document.
    ldoc.Close(True)

    Items

    Gets the collection of list field.[Read-Only]

    Declaration
    public PdfLoadedListFieldItemCollection Items { get; }
    Property Value
    Type Description
    PdfLoadedListFieldItemCollection

    The collection of list box items.

    Examples
    // Loads an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load the list box field 
    PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
    // List box items collection
    PdfLoadedListFieldItemCollection listcollection = listField.Items;
    listcollection[0].Location = new PointF(100, 200);
    doc.Save("Sample.pdf");
    doc.Close(true);
    ' Loads an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load the list box field 
    Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
    ' List box items collection
    Dim listcollection As PdfLoadedListFieldItemCollection = listField.Items
    listcollection(0).Location = New PointF(100, 200)
    doc.Save("Sample.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedListBoxField

    MultiSelect

    Gets or sets a value indicating whether the field is multi-selectable.

    Declaration
    public bool MultiSelect { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    // Loads an existing document
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    // Load the list box field 
    PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
    // Enabling the multi selection option
    listField.MultiSelect = true;
    doc.Save("Sample.pdf");
    doc.Close(true);
    ' Loads an existing document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    ' Load the list box field 
    Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
    ' Enabling the multi selection option
    listField.MultiSelect = True
    doc.Save("Sample.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedListBoxField

    Methods

    Remove(PdfLoadedListFieldItem)

    Remove the particular PdfLoadedListFieldItem from PdfLoadedListBoxField.

    Declaration
    public void Remove(PdfLoadedListFieldItem item)
    Parameters
    Type Name Description
    PdfLoadedListFieldItem item
    Examples
     //Load an existing document
     PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
     //Get the loaded form.
      PdfLoadedForm loadedForm = loadedDocument.Form;
     //Get the listBox field
     PdfLoadedListBoxField listBoxField = loadedForm.Fields[0] as PdfLoadedListBoxField;
     //Get the listBoxField item
     PdfLoadedListFieldItem listBoxFieldItem = listBoxField.Items[0] as PdfLoadedListFieldItem;
    //Remove the listBoxField item
     loadedField.Remove(listBoxFieldItem); 
    //Save the modified document.
     loadedDocument.Save("form.pdf");
    //Close the document
    loadedDocument.Close(true);

    RemoveAt(Int32)

    Remove the PdfLoadedListBoxField item at the specified index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Examples
     //Load an existing document
     PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");        
     //Get the loaded form.
      PdfLoadedForm loadedForm = loadedDocument.Form;
     //Get the listBoxField 
     PdfLoadedListBoxField listBoxField = loadedForm.Fields[0] as PdfLoadedListBoxField;       
    //Remove the listBoxField item
     listBoxField.RemoveAt(0);
    //Save the modified document.
     loadedDocument.Save("form.pdf");
    //Close the document
    loadedDocument.Close(true);

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

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