Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#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