windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-178e1b4b.md
Occurs before the form field editor is activated.
Namespace : DevExpress.XtraPdfViewer
Assembly : DevExpress.XtraPdfViewer.v25.2.dll
NuGet Package : DevExpress.Win.PdfViewer
public event PdfFormFieldEditorShowingEventHandler FormFieldEditorShowing
Public Event FormFieldEditorShowing As PdfFormFieldEditorShowingEventHandler
The FormFieldEditorShowing event's data class is PdfFormFieldEditorShowingEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
| FieldName | Gets the form field name. |
| Value | Retrieves the form field value. |
Handle the FormFieldEditorShowing event to obtain the form field’s value before the editor is opened and cancel editing if necessary.
The code sample below shows how to disable a form field editor with a specific name:
using DevExpress.XtraPdfViewer;
private void PdfViewer_FormFieldEditorShowing(object sender, PdfFormFieldEditorShowingEventArgs e)
{
if (e.FieldName == "Field1")
e.Cancel= true;
}
Imports DevExpress.XtraPdfViewer
Private Sub PdfViewer_FormFieldEditorShowing(ByVal sender As Object, ByVal e As PdfFormFieldEditorShowingEventArgs)
If e.FieldName = "Field1" Then
e.Cancel= True
End If
End Sub
See Also