menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfXfaCornerShape - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfXfaCornerShape

    Specifies the corner shapes

    Inheritance
    System.Object
    PdfXfaCornerShape
    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public sealed class PdfXfaCornerShape : Enum
    Examples
    //Create a new PDF XFA document.
    PdfXfaDocument document = new PdfXfaDocument();
    //Create a form.
    PdfXfaForm parentForm = new PdfXfaForm(PdfXfaFlowDirection.Vertical, 595);
    parentForm.Margins.All = 10;
    //Create new XFA rectangle instance.
    PdfXfaRectangleField rect = new PdfXfaRectangleField("rect1", new SizeF(200, 100));
    //Create a new corner instance.
    PdfXfaCorner corner = new PdfXfaCorner();
    //Set inverted.
    corner.IsInverted = true;
    //Set corner shape.
    corner.Shape = PdfXfaCornerShape.Round;
    //Set corner thickness
    corner.Thickness = 5;
    //Set corner border color.
    corner.BorderColor = Color.Green;
    //Set the corner border style.
    corner.BorderStyle = PdfXfaBorderStyle.Solid;
    //Set the radius of the corner.
    corner.Radius = 5f;
    //Set the visibility of the corner.
    corner.Visibility = PdfXfaVisibility.Visible;
    //Set the corner of the rectangle
    rect.Corner = corner;
    //Set the border style.
    rect.Border.Style = PdfXfaBorderStyle.Solid;
    //Set rectangle border width.
    rect.Border.Width = 5;
    //Set the linear brush
    rect.Border.FillColor = new PdfXfaLinearBrush(Color.Red, Color.Yellow);
    //Add the field to form.
    parentForm.Fields.Add(rect);            
    document.XfaForm = parentForm;
    //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 parentForm As New PdfXfaForm(PdfXfaFlowDirection.Vertical, 595)
    parentForm.Margins.All = 10
    'Create new XFA rectangle instance.
    Dim rect As New PdfXfaRectangleField("rect1", New SizeF(200, 100))
    'Create a new corner instance.
    Dim corner As New PdfXfaCorner()
    'Set inverted.
    corner.IsInverted = True
    'Set corner shape.
    corner.Shape = PdfXfaCornerShape.Round
    'Set corner thickness
    corner.Thickness = 5
    'Set corner border color.
    corner.BorderColor = Color.Green
    'Set the corner border style.
    corner.BorderStyle = PdfXfaBorderStyle.Solid
    'Set the radius of the corner.
    corner.Radius = 5F
    'Set the visibility of the corner.
    corner.Visibility = PdfXfaVisibility.Visible
    'Set the corner of the rectangle
    rect.Corner = corner
    'Set the border style.
    rect.Border.Style = PdfXfaBorderStyle.Solid
    'Set rectangle border width.
    rect.Border.Width = 5
    'Set the linear brush
    rect.Border.FillColor = New PdfXfaLinearBrush(Color.Red, Color.Yellow)
    'Add the field to form.
    parentForm.Fields.Add(rect)
    document.XfaForm = parentForm
    'Save the document.
    document.Save("output.pdf", PdfXfaType.Dynamic)
    'Close the document
    document.Close()

    Fields

    Round

    Rounded corner

    Declaration
    public const PdfXfaCornerShape Round
    Field Value
    Type
    PdfXfaCornerShape

    Square

    Squared corner

    Declaration
    public const PdfXfaCornerShape Square
    Field Value
    Type
    PdfXfaCornerShape

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved