Skip to main content
A newer version of this page is available. .

PdfViewer.FileAttachmentOpening Event

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.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v18.2.dll

Declaration

public event PdfFileAttachmentOpeningEventHandler FileAttachmentOpening

Event Data

The FileAttachmentOpening event's data class is PdfFileAttachmentOpeningEventArgs. 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.
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.

Remarks

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.

AttachmentSecurityWarning

See Also