---
title: "Windows Desktop SDK: Callbacks"
description: "Handle widget events and lifecycle callbacks with the Gleap Windows Desktop SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/626-windows-desktop-sdk-callbacks
collection: "Windows Desktop (Beta)"
updated: 2026-11-01
language: en
---

# Windows Desktop SDK: Callbacks

Handle widget events and lifecycle callbacks with the Gleap Windows Desktop 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

- [Windows Desktop SDK setup](https://docs.gleap.ai/en/articles/616-windows-desktop-sdk-setup.md)
- [Windows Desktop SDK: User identity](https://docs.gleap.ai/en/articles/617-windows-desktop-sdk-user-identity.md)
- [Windows Desktop SDK: Track events](https://docs.gleap.ai/en/articles/618-windows-desktop-sdk-track-events.md)
- [Windows Desktop SDK: Track pages](https://docs.gleap.ai/en/articles/619-windows-desktop-sdk-track-pages.md)
- [Windows Desktop SDK: Forms](https://docs.gleap.ai/en/articles/620-windows-desktop-sdk-forms.md)
