PdfAcroFormValueFormat.CreateNumberFormat(Int32, PdfAcroFormNumberSeparatorStyle, String, PdfAcroFormCurrencyStyle, PdfAcroFormNegativeNumberStyle) Method
Creates a number format for a form field value.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.1.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 |
---|---|---|
decimalPlaces | Int32 | A number of decimal places. |
separatorStyle | PdfAcroFormNumberSeparatorStyle | An enumeration value that indicates the number separator style. |
currencySymbol | String | A currency symbol. |
currencyStyle | PdfAcroFormCurrencyStyle | An enumeration value that indicates the currency style. |
negativeNumberStyle | PdfAcroFormNegativeNumberStyle | An enumeration value that indicates the negative number style. |
Returns
Type | Description |
---|---|
PdfAcroFormValueFormat | 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