PdfAcroFormValueFormat.CreateNumberFormat(Int32, PdfAcroFormNumberSeparatorStyle, String, PdfAcroFormCurrencyStyle, PdfAcroFormNegativeNumberStyle) Method
In This Article
Creates a number format for a form field value.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
#Declaration
public static PdfAcroFormValueFormat CreateNumberFormat(
int decimalPlaces,
PdfAcroFormNumberSeparatorStyle separatorStyle,
string currencySymbol,
PdfAcroFormCurrencyStyle currencyStyle,
PdfAcroFormNegativeNumberStyle negativeNumberStyle
)
#Parameters
Name | Type | Description |
---|---|---|
decimal |
Int32 | A number of decimal places. |
separator |
Pdf |
An enumeration value that indicates the number separator style. |
currency |
String | A currency symbol. |
currency |
Pdf |
An enumeration value that indicates the currency style. |
negative |
Pdf |
An enumeration value that indicates the negative number style. |
#Returns
Type | Description |
---|---|
Pdf |
An object that contains the number format. |
#Remarks
The code sample below shows how to create a text box field with a monetary value:
//Create a text box with a monetary value:
var numberBox = new PdfAcroFormTextBoxField("number", 1, new PdfRectangle(10, 70, 100, 100));
numberBox.ValueFormat =
PdfAcroFormValueFormat.CreateNumberFormat(2, PdfAcroFormNumberSeparatorStyle.Dot, "$", PdfAcroFormCurrencyStyle.AfterWithSpace, PdfAcroFormNegativeNumberStyle.None);
numberBox.Text = "264.88 $";
See Also