ASP.NET Core

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfXfaCheckedStyle - ASP.NETCore API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfXfaCheckedStyle

    Represents the XFA checkBox style

    Inheritance
    System.Object
    PdfXfaCheckedStyle
    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public sealed class PdfXfaCheckedStyle : 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

    Check

    A check mark is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Check
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Circle

    A circle is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Circle
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Cross

    A cross is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Cross
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Default

    default checked state.

    Declaration
    public const PdfXfaCheckedStyle Default
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Diamond

    A diamond symbol is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Diamond
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Square

    A square is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Square
    Field Value
    Type Description
    PdfXfaCheckedStyle

    Star

    A star is used for the checked state.

    Declaration
    public const PdfXfaCheckedStyle Star
    Field Value
    Type Description
    PdfXfaCheckedStyle

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved