PdfDocumentView.BeforeAnnotationDelete Event
Occurs before an annotation is deleted using the DEL key or the Delete menu item in annotation's default context menu.
Event Type
EventHandler<PdfVisualAnnotationDeleteEventArgs>
Remarks
This event is raised when the user hits the DEL key or selects the Delete menu item (
) in the annotation's default context menu.
It allows the application to cancel the annotation deletion by setting the PdfVisualAnnotationDeleteEventArgs.AllowDelete property to false.
The code below shows how to handle the event and control the annotation deletion based on user input:
| C# | |
|---|---|