Back to Devexpress

PdfViewer.FileAttachmentOpening Event

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-b8182b3e.md

latest2.9 KB
Original Source

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

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public event PdfFileAttachmentOpeningEventHandler FileAttachmentOpening
vb
Public Event FileAttachmentOpening As PdfFileAttachmentOpeningEventHandler

Event Data

The FileAttachmentOpening event's data class is PdfFileAttachmentOpeningEventArgs. 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.
FileAttachmentGets the file attachment stored in the Attachments tab of the PDF Viewer.
HandledGets 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.

See Also

PDF Viewer Navigation Pane

Attachments

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace