---
title: "Control annotations easily with event APIs"
canonical_url: "https://www.nutrient.io/guides/maui/events/annotation/"
md_url: "https://www.nutrient.io/guides/maui/events/annotation.md"
last_updated: "2026-05-30T02:20:01.341Z"
description: "Discover how to manage annotation events in your MAUI app for better user interaction."
---

# Manage annotation events in your MAUI app

In addition to controlling annotation changes via our [create, update, and delete APIs](https://www.nutrient.io/guides/maui/annotations/introduction-to-annotations/supported-types.md), we also expose a number of events that can be used to intercept annotation changes that originate in the user interface (UI) by clicks from the user.

| Event                                      | Use case                                                                |
| ------------------------------------------ | ----------------------------------------------------------------------- |
| [`IAnnotation.Focused`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotation.html#PSPDFKit_Api_Annotation_IAnnotation_Focused)                  | Fires when an annotation is focused.                                    |
| [`IAnnotation.Unfocused`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotation.html#PSPDFKit_Api_Annotation_IAnnotation_Unfocused)                | Fires when an annotation loses focus.                                   |
| [`IAnnotation.Pressed`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotation.html#PSPDFKit_Api_Annotation_IAnnotation_Pressed)                  | Fires when an annotation is pressed.                                    |
| [`IAnnotation.Selected`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotation.html#PSPDFKit_Api_Annotation_IAnnotation_Selected)                 | Fires when an annotation is selected.                                   |
| [`IAnnotation.Deselected`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotation.html#PSPDFKit_Api_Annotation_IAnnotation_Deselected)               | Fires when an annotation is deselected.                                 |
| [`IAnnotationManager.AnnotationsChanged`]  | Fires when annotations change either due to user action or via the API. |
| [`IAnnotationManager.AnnotationsChanging`] | Fires when a user starts or ends an interaction with an annotation.     |
| [`IAnnotationManager.AnnotationsCreated`]  | Fires when a new annotation is created.                                 |
| [`IAnnotationManager.AnnotationsDeleted`]  | Fires when annotations were deleted.                                    |
| [`IAnnotationManager.AnnotationsLoaded`]   | Fires when annotations are loaded from annotation provider.             |
| [`IAnnotationManager.AnnotationsSaving`]   | Fires before annotations will be saved.                                 |
| [`IAnnotationManager.AnnotationsSaved`]    | Fires before annotations were saved.                                    |
| [`IAnnotationManager.AnnotationsUpdated`]  | Fires when annotations were updated.                                    |

### C#

```csharp

annotation.Focused += () => {
  Console.WriteLine("Annotation focused");
};

annotation.Unfocused += () => {
  Console.WriteLine("Annotation unfocused");
};

annotation.Pressed += (isSelected, preventDefault) => {
  Console.WriteLine("Annotation pressed");
};

annotation.Selected += () => {
  Console.WriteLine("Annotation selected");
};

annotation.Deselected += () => {
  Console.WriteLine("Annotation deselected");
};

annotationManager.AnnotationsChanged += () => {
  Console.WriteLine("Annotations changed");
};

annotationManager.AnnotationsChanging += (annotations, reason) => {
  if (reason.AnnotationsChaningReason.DrawEnd) {
    Console.WriteLine("Annotations changing");
  }
};

annotationManager.AnnotationsCreated += (annotations) => {
  foreach(var annotation in annotations) {
    Console.WriteLine(annotation.id);
  }
};

annotationManager.AnnotationsDeleted += (annotations) => {
  foreach(var annotation in annotations) {
    Console.WriteLine(annotation.id);
  }
};

annotationManager.AnnotationsLoaded += (annotations) => {
  foreach(var annotation in annotations) {
    Console.WriteLine(annotation.id);
  }
};

annotationManager.AnnotationsSaving += () => {
  Console.WriteLine("Saving annotations");
};

annotationManager.AnnotationsSaved += () => {
  Console.WriteLine("Saved annotations");
};

annotationManager.AnnotationsUpdated += (annotations) => {
  foreach(var annotation in annotations) {
    Console.WriteLine(annotation.id);
  }
};

```
---

## Related pages

- [Events and notifications in our MAUI viewer](/guides/maui/events.md)

