Back to Devexpress

PdfViewer.AnnotationCreating Event

maui-devexpress-dot-maui-dot-pdf-dot-pdfviewer-ea9b6469.md

latest1.9 KB
Original Source

PdfViewer.AnnotationCreating Event

Occurs before a newly-created annotation is added to a PDF document page.

Namespace : DevExpress.Maui.Pdf

Assembly : DevExpress.Maui.Pdf.dll

NuGet Package : DevExpress.Maui.Pdf

Declaration

csharp
public event EventHandler<PdfAnnotationCreatingEventArgs> AnnotationCreating

Event Data

The AnnotationCreating event's data class is PdfAnnotationCreatingEventArgs. The following properties provide information specific to this event:

PropertyDescription
BuilderReturns an object that is used to build an annotation.
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.

Remarks

The following code snippet specifies the author name for highlight annotations:

cs
private void pdfViewer_AnnotationCreating(object sender, PdfAnnotationCreatingEventArgs e) {
    if (e.Builder.AnnotationType == PdfAnnotationType.TextMarkup) {
        IPdfViewerMarkupAnnotationBuilder builder =
        e.Builder.AsTextMarkupAnnotationBuilder();
        builder.Author = "John Smith";

    }
}

See Also

PdfViewer Class

PdfViewer Members

DevExpress.Maui.Pdf Namespace