menu

Xamarin.Android

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

    Show / Hide Table of Contents

    Class PdfCheckFieldBase

    Represents base class for field which can be in checked and unchecked states.

    Inheritance
    System.Object
    PdfField
    PdfStyledField
    PdfCheckFieldBase
    PdfCheckBoxField
    PdfRadioButtonListItem
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfField.DisableAutoFormat
    PdfField.Export
    PdfField.Flatten
    PdfField.Form
    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.Bounds
    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 PdfCheckFieldBase : PdfStyledField, IPdfWrapper, INotifyPropertyChanged
    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 graphics = page.Graphics;
    //Create a check box
    PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");    
    checkBox.Bounds = new RectangleF(100, 290, 20, 20);
    document.Form.Fields.Add(checkBox);
    checkBox.HighlightMode = PdfHighlightMode.Push;
    checkBox.BorderStyle = PdfBorderStyle.Beveled;
    //Set the value for the check box
    checkBox.Checked = true;
    document.Form.Fields.Add(checkBox);
    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 graphics As PdfGraphics = page.Graphics
    'Create a check box
    Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")
    checkBox.Bounds = New RectangleF(100, 290, 20, 20)
    document.Form.Fields.Add(checkBox)
    checkBox.HighlightMode = PdfHighlightMode.Push
    checkBox.BorderStyle = PdfBorderStyle.Beveled
    'Set the value for the check box
    checkBox.Checked = True
    document.Form.Fields.Add(checkBox)
    document.Save("Form.pdf")
    document.Close(True)

    Constructors

    PdfCheckFieldBase(PdfPageBase, String)

    Initializes a new instance of the PdfCheckFieldBase class with the specific page and name.

    Declaration
    public PdfCheckFieldBase(PdfPageBase page, string name)
    Parameters
    Type Name Description
    PdfPageBase page

    The page where the fields should be placed.

    System.String name

    The name of the check box field.

    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 graphics = page.Graphics;
    //Create a check box
    PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
    checkBox.Bounds = new RectangleF(100, 290, 20, 20);
    document.Form.Fields.Add(checkBox);
    checkBox.HighlightMode = PdfHighlightMode.Push;
    checkBox.BorderStyle = PdfBorderStyle.Beveled;
    //Set the value for the check box
    checkBox.Checked = true;
    document.Form.Fields.Add(checkBox);
    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 graphics As PdfGraphics = page.Graphics
    'Create a check box
    Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")     
    checkBox.Bounds = New RectangleF(100, 290, 20, 20)
    document.Form.Fields.Add(checkBox)
    checkBox.HighlightMode = PdfHighlightMode.Push
    checkBox.BorderStyle = PdfBorderStyle.Beveled
    'Set the value for the check box
    checkBox.Checked = True
    document.Form.Fields.Add(checkBox)
    document.Save("Form.pdf")
    document.Close(True)
    See Also
    PdfStyledField
    PdfPage
    PdfDocument
    PdfFont

    Properties

    Style

    Gets or sets the style.

    Declaration
    public PdfCheckBoxStyle Style { get; set; }
    Property Value
    Type Description
    PdfCheckBoxStyle

    The PdfCheckBoxStyle object specifies the style of the check box field.

    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 graphics = page.Graphics;
    //Create a check box
    PdfCheckBoxField checkBox = new PdfCheckBoxField(page, "C#.NET");
    //Set the value for the check box
    checkBox.Style = PdfCheckBoxStyle.Circle;        
    checkBox.Bounds = new RectangleF(100, 290, 20, 20);
    document.Form.Fields.Add(checkBox);
    checkBox.HighlightMode = PdfHighlightMode.Push;
    checkBox.BorderStyle = PdfBorderStyle.Beveled;
    //Set the value for the check box
    checkBox.Checked = true;
    document.Form.Fields.Add(checkBox);
    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 graphics As PdfGraphics = page.Graphics
    'Create a check box
    Dim checkBox As PdfCheckBoxField = New PdfCheckBoxField(page, "C#.NET")       
    'Set the value for the check box
    checkBox.Style = PdfCheckBoxStyle.Circle        
    checkBox.Bounds = New RectangleF(100, 290, 20, 20)
    document.Form.Fields.Add(checkBox)
    checkBox.HighlightMode = PdfHighlightMode.Push
    checkBox.BorderStyle = PdfBorderStyle.Beveled
    'Set the value for the check box
    checkBox.Checked = True
    document.Form.Fields.Add(checkBox);
    document.Save("Form.pdf")
    document.Close(True)
    See Also
    PdfStyledField
    PdfPage
    PdfDocument
    PdfFont

    Methods

    DrawAppearance()

    Draws the appearance.

    Declaration
    protected virtual void DrawAppearance()

    Initialize()

    Initializes an instance.

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

    StyleToString(PdfCheckBoxStyle)

    Styles to string.

    Declaration
    protected string StyleToString(PdfCheckBoxStyle style)
    Parameters
    Type Name Description
    PdfCheckBoxStyle style

    The style.

    Returns
    Type Description
    System.String

    String representation of the check box' style.

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

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