Occurs when an attachment is opening in the Attachments panel and allows you to manage the attachment opening behavior. For example, the attachment contents are not opened if e.Cancel is set to true. If you want to hide the Security Warning message box, set the PdfFileAttachmentOpeningEventArgs.Handled property to true.
public event PdfFileAttachmentOpeningEventHandler FileAttachmentOpening
Public Event FileAttachmentOpening As PdfFileAttachmentOpeningEventHandler
The FileAttachmentOpening event's data class is PdfFileAttachmentOpeningEventArgs. The following properties provide information specific to this event:
|Cancel||Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.|
|FileAttachment||Gets the file attachment stored in the Attachments tab of the PDF Viewer.|
|Handled||Gets or sets a value that specifies whether the PdfViewer.FileAttachmentOpening event is handled; if handled, the Security Warning message box is hidden.|
The following image illustrates a security warning displayed in a PDF Viewer when clicking either the “Open file in its native application” icon or double-clicking the attachment in the Attachments tab.