.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphicsAcroFormBorderAppearance Class

Provides appearance settings used to paint the border of an interactive form field.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v20.2.Drawing.dll


public class PdfGraphicsAcroFormBorderAppearance


The PdfGraphicsAcroFormBorderAppearance class contains properties (e.g., PdfGraphicsAcroFormBorderAppearance.Color, PdfGraphicsAcroFormBorderAppearance.Style) that can be used to paint the border of an interactive form field.

To specify the border appearance settings, use the PdfGraphicsAcroFormFieldAppearance.BorderAppearance property.

To access the PdfGraphicsAcroFormFieldAppearance class, use the PdfGraphicsAcroFormField.Appearance property.


This example shows how to create a check box field and add it to a PDF document using the Document Creation API.

using DevExpress.Pdf;
using System.Drawing;

namespace AddCheckBoxField {
    class Program {
        static void Main(string[] args) {
            using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {

                // Create an empty document. 

                // Create graphics and draw a check box field.
                using (PdfGraphics graphics = processor.CreateGraphics()) {

                    // Render a page with graphics.
                    processor.RenderNewPage(PdfPaperSize.Letter, graphics);

        static void DrawCheckBoxField(PdfGraphics graphics) {

            // Create a check box field specifying its name and location.
            PdfGraphicsAcroFormCheckBoxField checkBox = new PdfGraphicsAcroFormCheckBoxField("check box", new RectangleF(20, 20, 30, 30));

            // Specify check box appearance, checked state, and button style.
            checkBox.Appearance.BackgroundColor = Color.Azure;
            checkBox.Appearance.BorderAppearance = new PdfGraphicsAcroFormBorderAppearance() { Color = Color.Red };
            checkBox.IsChecked = true;
            checkBox.ButtonStyle = PdfAcroFormButtonStyle.Star;

            // Add the field to the document.


See Also