menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class PdfRadioButtonListItem

    Represents an item of a radio button list.

    Inheritance
    System.Object
    PdfField
    PdfStyledField
    PdfCheckFieldBase
    PdfRadioButtonListItem
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfCheckFieldBase.Style
    PdfCheckFieldBase.StyleToString(PdfCheckBoxStyle)
    PdfField.DisableAutoFormat
    PdfField.Export
    PdfField.Flatten
    PdfField.GetValue(String)
    PdfField.Layer
    PdfField.MappingName
    PdfField.Name
    PdfField.Page
    PdfField.PdfTag
    PdfField.PropertyChanged
    PdfField.ReadOnly
    PdfField.Required
    PdfField.SetValue(String, String)
    PdfField.TabIndex
    PdfField.ToolTip
    PdfStyledField.Actions
    PdfStyledField.BackColor
    PdfStyledField.BorderColor
    PdfStyledField.BorderStyle
    PdfStyledField.BorderWidth
    PdfStyledField.DefineDefaultAppearance()
    PdfStyledField.Font
    PdfStyledField.ForeColor
    PdfStyledField.HighlightMode
    PdfStyledField.Location
    PdfStyledField.ObtainFont()
    PdfStyledField.RotationAngle
    PdfStyledField.Size
    PdfStyledField.TextAlignment
    PdfStyledField.Visibility
    PdfStyledField.Visible
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfRadioButtonListItem : PdfCheckFieldBase, INotifyPropertyChanged, IPdfWrapper
    Remarks

    Please refer the UG docuemntation link https://help.syncfusion.com/file-formats/pdf/working-with-forms#adding-the-radio-button-field for more details.

    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();           
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
    PdfBrush brush = PdfBrushes.Black;
    PdfGraphics g = page.Graphics;
    //Create a Radiobutton
    PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
    //Add to document
    document.Form.Fields.Add(employeesRadioList);
    //Create radiobutton items 
    PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
    radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
    g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
    PdfRadioButtonListItem radioItem2 = new PdfRadioButtonListItem("10-49");
    radioItem2.Bounds = new RectangleF(100, 170, 20, 20);
    g.DrawString("10-49", font, brush, new RectangleF(150, 175, 180, 20));
    PdfRadioButtonListItem radioItem3 = new PdfRadioButtonListItem("50-99");
    radioItem3.Bounds = new RectangleF(100, 200, 20, 20);
    g.DrawString("50-99", font, brush, new RectangleF(150, 205, 180, 20));
    PdfRadioButtonListItem radioItem4 = new PdfRadioButtonListItem("100-499");
    radioItem4.Bounds = new RectangleF(100, 230, 20, 20);
    g.DrawString("100-499", font, brush, new RectangleF(150, 235, 180, 20));
    PdfRadioButtonListItem radioItem5 = new PdfRadioButtonListItem("500-more");
    radioItem5.Bounds = new RectangleF(100, 260, 20, 20);
    g.DrawString("500-more", font, brush, new RectangleF(150, 265, 180, 20));
    //add the items to radio button group
    employeesRadioList.Items.Add(radioItem1);
    employeesRadioList.Items.Add(radioItem2);
    employeesRadioList.Items.Add(radioItem3);
    employeesRadioList.Items.Add(radioItem4);
    employeesRadioList.Items.Add(radioItem5);
    document.Save("Form.pdf");
    document.Close(true);
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Create a page
    Dim page As PdfPage = document.Pages.Add()
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
    Dim brush As PdfBrush = PdfBrushes.Black
    Dim g As PdfGraphics = page.Graphics
    'Create a Radiobutton
    Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
    'Add to document
    document.Form.Fields.Add(employeesRadioList)
    'Create radiobutton items 
    Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
    radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
    g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
    Dim radioItem2 As PdfRadioButtonListItem = New PdfRadioButtonListItem("10-49")
    radioItem2.Bounds = New RectangleF(100, 170, 20, 20)
    g.DrawString("10-49", font, brush, New RectangleF(150, 175, 180, 20))
    Dim radioItem3 As PdfRadioButtonListItem = New PdfRadioButtonListItem("50-99")
    radioItem3.Bounds = New RectangleF(100, 200, 20, 20)
    g.DrawString("50-99", font, brush, New RectangleF(150, 205, 180, 20))
    Dim radioItem4 As PdfRadioButtonListItem = New PdfRadioButtonListItem("100-499")
    radioItem4.Bounds = New RectangleF(100, 230, 20, 20)
    g.DrawString("100-499", font, brush, New RectangleF(150, 235, 180, 20))
    Dim radioItem5 As PdfRadioButtonListItem = New PdfRadioButtonListItem("500-more")
    radioItem5.Bounds = New RectangleF(100, 260, 20, 20)
    g.DrawString("500-more", font, brush, New RectangleF(150, 265, 180, 20))
    'add the items to radio button group
    employeesRadioList.Items.Add(radioItem1)
    employeesRadioList.Items.Add(radioItem2)
    employeesRadioList.Items.Add(radioItem3)
    employeesRadioList.Items.Add(radioItem4)
    employeesRadioList.Items.Add(radioItem5)
    document.Save("Form.pdf")
    document.Close(True)

    Constructors

    PdfRadioButtonListItem()

    Initializes a new instance of the PdfRadioButtonListItem class.

    Declaration
    public PdfRadioButtonListItem()

    PdfRadioButtonListItem(String)

    Initializes a new instance of the PdfRadioButtonListItem class with the specific value.

    Declaration
    public PdfRadioButtonListItem(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Properties

    Bounds

    Gets or sets the bounds.

    Declaration
    public override RectangleF Bounds { get; set; }
    Property Value
    Type
    RectangleF
    Overrides
    PdfStyledField.Bounds
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();           
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    //Create a Radiobutton
    PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
    //Add to document
    document.Form.Fields.Add(employeesRadioList);
    //Create radiobutton items 
    PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
    radioItem1.Bounds = new RectangleF(100, 140, 20, 20);           
    //add the items to radio button group
    employeesRadioList.Items.Add(radioItem1);
    document.Save("Form.pdf");
    document.Close(true);
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Create a page
    Dim page As PdfPage = document.Pages.Add()
    'Create a Radiobutton
    Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
    'Add to document
    document.Form.Fields.Add(employeesRadioList)
    'Create radiobutton items 
    Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
    radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
    'add the items to radio button group
    employeesRadioList.Items.Add(radioItem1)
    document.Save("Form.pdf")
    document.Close(True)
    See Also
    PdfField
    PdfDocument
    PdfPage
    PdfRadioButtonListField

    Form

    Gets the form of the field.[Read-Only]

    Declaration
    public override PdfForm Form { get; }
    Property Value
    Type Description
    PdfForm

    The PdfForm object of the field.

    Overrides
    PdfField.Form
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();           
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
    PdfBrush brush = PdfBrushes.Black;
    PdfGraphics g = page.Graphics;
    //Create a Radiobutton
    PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
    //Add to document
    document.Form.Fields.Add(employeesRadioList);
    //Create radiobutton items 
    PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem("1-9");
    radioItem1.Bounds = new RectangleF(100, 140, 20, 20);
    g.DrawString("1-9", font, brush, new RectangleF(150, 145, 180, 20));
    //add the items to radio button group
    employeesRadioList.Items.Add(radioItem1);
    // Gets the form
    PdfForm form = employeesRadioList.Form;
    document.Save("Form.pdf");
    document.Close(true);
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Create a page
    Dim page As PdfPage = document.Pages.Add()
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
    Dim brush As PdfBrush = PdfBrushes.Black
    Dim g As PdfGraphics = page.Graphics
    'Create a Radiobutton
    Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
    'Add to document
    document.Form.Fields.Add(employeesRadioList)
    'Create radiobutton items 
    Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem("1-9")
    radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
    g.DrawString("1-9", font, brush, New RectangleF(150, 145, 180, 20))
    'add the items to radio button group
    employeesRadioList.Items.Add(radioItem1)
    ' Gets the form
    Dim form As PdfForm = employeesRadioList.Form
    document.Save("Form.pdf")
    document.Close(True)
    See Also
    PdfField
    PdfDocument
    PdfPage
    PdfRadioButtonListField

    Value

    Gets or sets the value.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    The value.

    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();           
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    //Create a Radiobutton
    PdfRadioButtonListField employeesRadioList = new PdfRadioButtonListField(page, "employeesRadioList");
    //Add to document
    document.Form.Fields.Add(employeesRadioList);
    //Create radiobutton items 
    PdfRadioButtonListItem radioItem1 = new PdfRadioButtonListItem();
    radioItem1.Value = "1-9";
    radioItem1.Bounds = new RectangleF(100, 140, 20, 20);           
    //add the items to radio button group
    employeesRadioList.Items.Add(radioItem1);
    document.Save("Form.pdf");
    document.Close(true);
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Create a page
    Dim page As PdfPage = document.Pages.Add()
    'Create a Radiobutton
    Dim employeesRadioList As PdfRadioButtonListField = New PdfRadioButtonListField(page, "employeesRadioList")
    'Add to document
    document.Form.Fields.Add(employeesRadioList)
    'Create radiobutton items 
    Dim radioItem1 As PdfRadioButtonListItem = New PdfRadioButtonListItem()
    radioItem1.Value = "1-9"
    radioItem1.Bounds = New RectangleF(100, 140, 20, 20)
    'add the items to radio button group
    employeesRadioList.Items.Add(radioItem1)
    document.Save("Form.pdf")
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    PdfRadioButtonListField

    Methods

    DrawAppearance()

    Draws the appearance.

    Declaration
    protected override void DrawAppearance()
    Overrides
    PdfCheckFieldBase.DrawAppearance()

    Initialize()

    Initializes instance.

    Declaration
    protected override void Initialize()
    Overrides
    PdfCheckFieldBase.Initialize()

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

    PdfField
    PdfDocument
    PdfPage
    PdfRadioButtonListField
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved