menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class PdfXfaCheckBoxAppearance

    Represents the XFA checkBox shape

    Inheritance
    System.Object
    PdfXfaCheckBoxAppearance
    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public sealed class PdfXfaCheckBoxAppearance : Enum
    Examples
    //Create a new PDF XFA document.
    PdfXfaDocument document = new PdfXfaDocument();
    //Create a form.
    PdfXfaForm xfaForm = new PdfXfaForm(PdfXfaFlowDirection.Vertical, 595);
    //Set margin of the form.            
    xfaForm.Margins.All = 10;
    //Create new XFA check box field.
    PdfXfaCheckBoxField field = new PdfXfaCheckBoxField("check1", new SizeF(100, 30));
    //Set caption.
    field.Caption.Text = "CheckBox";         
    //Set checkbox appearance.
    field.CheckBoxAppearance = PdfXfaCheckBoxAppearance.Square;
    //Set the check box size.
    field.CheckBoxSize = 10;
    //Set the checked style.
    field.CheckedStyle = PdfXfaCheckedStyle.Cross;  
    //Set the check box checked state.         
    field.IsChecked = true;
    //Add the field to form.
    xfaForm.Fields.Add(field);          
    document.XfaForm = xfaForm;
    //Save the document.
    document.Save("output.pdf", PdfXfaType.Dynamic);
    //Close the document
    document.Close();
    'Create a new PDF XFA document.
    Dim document As New PdfXfaDocument()
    'Create a form.
    Dim xfaForm As New PdfXfaForm(PdfXfaFlowDirection.Vertical, 595)
    'Set margin of the form.            
    xfaForm.Margins.All = 10
    'Create new XFA check box field.
    Dim field As New PdfXfaCheckBoxField("check1", New SizeF(100, 30))
    'Set caption.
    field.Caption.Text = "CheckBox"
    'Set checkbox appearance.
    field.CheckBoxAppearance = PdfXfaCheckBoxAppearance.Square
    'Set the check box size.
    field.CheckBoxSize = 10
    'Set the checked style.
    field.CheckedStyle = PdfXfaCheckedStyle.Cross
    'Set the check box checked state.         
    field.IsChecked = True
    'Add the field to form.
    xfaForm.Fields.Add(field)
    document.XfaForm = xfaForm
    'Save the document.
    document.Save("output.pdf", PdfXfaType.Dynamic)
    'Close the document
    document.Close()

    Fields

    Round

    Rounded checkBox

    Declaration
    public const PdfXfaCheckBoxAppearance Round
    Field Value
    Type
    PdfXfaCheckBoxAppearance

    Square

    Squred checkBox

    Declaration
    public const PdfXfaCheckBoxAppearance Square
    Field Value
    Type
    PdfXfaCheckBoxAppearance
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved