---
title: ".NET MAUI SDK: Callbacks"
description: "Handle widget events and lifecycle callbacks with the Gleap .NET MAUI SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/650-net-maui-sdk-callbacks
collection: ".NET MAUI (Beta)"
updated: 2026-11-01
language: en
---

# .NET MAUI SDK: Callbacks

Handle widget events and lifecycle callbacks with the Gleap .NET MAUI SDK. Follow the integration code examples.

Set callbacks for different actions to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.

```csharp
Gleap.RegisterListener("feedbackFlowStarted", flow =>
{
    // Do something with the flow
});
```

```csharp
Gleap.RegisterListener("initialized", _ =>
{
    // Do something when Gleap is initialized
});
```

```csharp
Gleap.RegisterListener("notificationCountUpdated", count =>
{
    // Do something with the count
});
```

```csharp
Gleap.RegisterListener("feedbackSent", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("feedbackSendingFailed", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("widgetOpened", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("widgetClosed", _ =>
{
    // Do something
});
```

You can detach a listener again with `Gleap.RemoveListener(eventName, handler)`.

## Related

- [.NET MAUI SDK setup](https://docs.gleap.ai/en/articles/640-net-maui-sdk-setup.md)
- [.NET MAUI SDK: User identity](https://docs.gleap.ai/en/articles/641-net-maui-sdk-user-identity.md)
- [.NET MAUI SDK: Track events](https://docs.gleap.ai/en/articles/642-net-maui-sdk-track-events.md)
- [.NET MAUI SDK: Track pages](https://docs.gleap.ai/en/articles/643-net-maui-sdk-track-pages.md)
- [.NET MAUI SDK: Forms](https://docs.gleap.ai/en/articles/644-net-maui-sdk-forms.md)
