Back to Devexpress

PdfViewer.AnnotationChanging Event

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-9bd6a44a.md

latest2.4 KB
Original Source

PdfViewer.AnnotationChanging Event

Fires before the annotation is changed.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public event PdfAnnotationChangingEventHandler AnnotationChanging
vb
Public Event AnnotationChanging As PdfAnnotationChangingEventHandler

Event Data

The AnnotationChanging event's data class is PdfAnnotationChangingEventArgs. 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.
NewAnnotationReturns an annotation’s new property values.
OldAnnotationReturns an annotation’s previous property values.

Remarks

The code sample below prohibits changing annotations of a specific author:

csharp
using DevExpress.XtraPdfViewer;

private void PdfViewer_AnnotationChanging(object sender, PdfAnnotationChangingEventArgs e)
{
    if (e.OldAnnotation.Author == "Cardle Anita L") { e.Cancel = true; }
}
vb
Imports DevExpress.XtraPdfViewer

Private Sub PdfViewer_AnnotationChanging(ByVal sender As Object, ByVal e As PdfAnnotationChangingEventArgs)
  If e.OldAnnotation.Author = "Cardle Anita L" Then
    e.Cancel = True
  End If
End Sub

See Also

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace