Class PdfXfaBorderStyle
Represent XFA border style
Inheritance
System.Object
PdfXfaBorderStyle
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public sealed class PdfXfaBorderStyle : Enum
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Set border fill color.
border.FillColor = new PdfXfaSolidBrush(Color.Green);
//Set handedness of the border.
border.Handedness = PdfXfaHandedness.Right;
//Set the style of the border.
border.Style = PdfXfaBorderStyle.Raised;
//Set the border visibility.
border.Visibility = PdfXfaVisibility.Visible;
//Set the border with.
border.Width = 2;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//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()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Set border fill color.
border.FillColor = New PdfXfaSolidBrush(Color.Green)
'Set handedness of the border.
border.Handedness = PdfXfaHandedness.Right
'Set the style of the border.
border.Style = PdfXfaBorderStyle.Raised
'Set the border visibility.
border.Visibility = PdfXfaVisibility.Visible
'Set the border with.
border.Width = 2
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Fields
DashDot
A dashed dotted rectangle surrounding.
Declaration
public const PdfXfaBorderStyle DashDot
Field Value
Type |
---|
PdfXfaBorderStyle |
DashDotDot
A dashed dotted dotted rectangle surrounding.
Declaration
public const PdfXfaBorderStyle DashDotDot
Field Value
Type |
---|
PdfXfaBorderStyle |
Dashed
A dashed rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Dashed
Field Value
Type |
---|
PdfXfaBorderStyle |
Dotted
A dotted rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Dotted
Field Value
Type |
---|
PdfXfaBorderStyle |
Embossed
Embossed rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Embossed
Field Value
Type |
---|
PdfXfaBorderStyle |
Etched
Etched rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Etched
Field Value
Type |
---|
PdfXfaBorderStyle |
Lowered
A lowered rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Lowered
Field Value
Type |
---|
PdfXfaBorderStyle |
None
No Border
Declaration
public const PdfXfaBorderStyle None
Field Value
Type |
---|
PdfXfaBorderStyle |
Raised
Raised rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Raised
Field Value
Type |
---|
PdfXfaBorderStyle |
Solid
A solid rectangle surrounding.
Declaration
public const PdfXfaBorderStyle Solid
Field Value
Type |
---|
PdfXfaBorderStyle |