Click or drag to resize

PdfPushButtonControl Constructor

Create a new push button control and assign it to the specified field.

Namespace:  Patagames.Pdf.Net.AcroForms
Assemblies:   Patagames.Pdf.Xamarin.iOS (in Patagames.Pdf.Xamarin.iOS.dll) Version: 4.57.2704
  Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.57.2704
Syntax
public PdfPushButtonControl(
	PdfPushButtonField field,
	PdfPage page,
	FS_RECTF rect,
	string caption,
	PdfAction action = null,
	Nullable<FS_COLOR> borderColor = null,
	Nullable<FS_COLOR> backgroundColor = null,
	Nullable<FS_COLOR> captionColor = null,
	PdfFont font = null,
	float fontSize = 0f,
	PdfBitmap icon = null,
	FormHighlightingMode highlightingMode = FormHighlightingMode.Push,
	TextPositions captionPos = TextPositions.TEXTPOS_CAPTION,
	IconScaleModes iconMode = IconScaleModes.Always,
	IconScaleTypes iconScale = IconScaleTypes.Proportional,
	float horizontalOffset = 0.5f,
	float verticalOffset = 0.5f,
	bool fitToBounds = false,
	PageRotate rotation = PageRotate.Normal,
	float borderWidth = 1f,
	BorderStyles borderStyle = BorderStyles.Solid,
	float[] dashPattern = null
)

Parameters

field
Type: Patagames.Pdf.Net.AcroFormsPdfPushButtonField
The field to which this control is assigned./>
page
Type: Patagames.Pdf.NetPdfPage
The page that will host this control.
rect
Type: Patagames.PdfFS_RECTF
The area on the page where this control should be placed.
caption
Type: SystemString
The pushbutton controls’s caption.
action (Optional)
Type: Patagames.Pdf.NetPdfAction
An action to be performed when the button is clicked.
borderColor (Optional)
Type: SystemNullableFS_COLOR
The color of the pushbutton control’s border.
backgroundColor (Optional)
Type: SystemNullableFS_COLOR
The color of the pushbutton control’s background.
captionColor (Optional)
Type: SystemNullableFS_COLOR
The color of the pushbutton control’s caption.
font (Optional)
Type: Patagames.Pdf.NetPdfFont
The font used for drawing caption.
fontSize (Optional)
Type: SystemSingle
The font's size.
icon (Optional)
Type: Patagames.Pdf.NetPdfBitmap
The pushbutton controls’s icon.
highlightingMode (Optional)
Type: Patagames.Pdf.EnumsFormHighlightingMode
The control’s highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area.
captionPos (Optional)
Type: Patagames.Pdf.EnumsTextPositions
A TextPositions enumeration indicating where to position the text of the pushbutton control’s caption relative to its icon.
iconMode (Optional)
Type: Patagames.Pdf.EnumsIconScaleModes
The circumstances under which the icon should be scaled inside the control rectangle.
iconScale (Optional)
Type: Patagames.Pdf.EnumsIconScaleTypes
The type of scaling to use.
horizontalOffset (Optional)
Type: SystemSingle
The number between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 positions the icon at the bottom corner of the control rectangle. A value of 0.5 centers it within the horizontal direction of rectangle. Is used only if the iconScale is Proportional.
verticalOffset (Optional)
Type: SystemSingle
The number between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left of the icon. A value of 0.0 positions the icon at the left corner of the control rectangle. A value of 0.5 centers it within the vertical direction of rectangle. Is used only if the iconScale is Proportional.
fitToBounds (Optional)
Type: SystemBoolean
A value indicating that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.
rotation (Optional)
Type: Patagames.Pdf.EnumsPageRotate
A value indicating how the pushbutton control is rotated counterclockwise relative to the page.
borderWidth (Optional)
Type: SystemSingle
The border width in points.
borderStyle (Optional)
Type: Patagames.Pdf.EnumsBorderStyles
The border style.
dashPattern (Optional)
Type: SystemSingle
An array defining a pattern of dashes and gaps to be used in drawing a dashed border. The dash array is specified in the same format as in the line dash pattern parameter of the graphics state. The dash phase is not specified and is assumed to be 0. For example, a DashPattern property of[3 2] specifies a border drawn with 3-point dashes alternating with 2-point gaps.
See Also