Back to Devexpress

PdfViewer.FormFieldEditorShowing Event

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-178e1b4b.md

latest2.5 KB
Original Source

PdfViewer.FormFieldEditorShowing Event

Occurs before the form field editor is activated.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public event PdfFormFieldEditorShowingEventHandler FormFieldEditorShowing
vb
Public Event FormFieldEditorShowing As PdfFormFieldEditorShowingEventHandler

Event Data

The FormFieldEditorShowing event's data class is PdfFormFieldEditorShowingEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
FieldNameGets the form field name.
ValueRetrieves the form field value.

Remarks

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:

csharp
using DevExpress.XtraPdfViewer;

private void PdfViewer_FormFieldEditorShowing(object sender, PdfFormFieldEditorShowingEventArgs e)
{
    if (e.FieldName == "Field1")
        e.Cancel= true;
}
vb
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

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace