menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfXfaRadialType - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Enum PdfXfaRadialType

    Specifies the direction of the color transition.

    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfXfaRadialType
    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 new XFA brush.
    PdfXfaRadialBrush brush = new PdfXfaRadialBrush(Color.Red, Color.Yellow);
    //Set the start color.
    brush.StartColor = Color.Black;
    //Set the end color.
    brush.EndColor = Color.HotPink;
    //Set the type.
    brush.Type = PdfXfaRadialType.CenterToEdge;
    //Set the linear brush
    rect.Border.FillColor = brush;
    //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 new XFA brush.
    Dim brush As New PdfXfaRadialBrush(Color.Red, Color.Yellow)
    'Set the start color.
    brush.StartColor = Color.Black
    'Set the end color.
    brush.EndColor = Color.HotPink
    'Set the type.
    brush.Type = PdfXfaRadialType.CenterToEdge
    'Set the linear brush
    rect.Border.FillColor = brush
    '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

    Name Description
    CenterToEdge

    The start color appears at the center of the object and transitions into the end color at the outer edge.

    EdgeToCenter

    The start color appears at the outer edge of the object and transitions into the end color at the center.

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