# Dialog Events

This article explains the events available in the Telerik Dialog for Blazor:

* [VisibleChanged](https://www.telerik.com/blazor-ui/documentation/components/dialog/events#visiblechanged)

> tip The event is an `EventCallback`. It can be synchronous and return `void`, or asynchronous and return `async Task`. Do not use `async void`.

## VisibleChanged

You can use the `VisibleChanged` event to get notifications when the user tries to close the Dialog. You can effectively cancel the event by *not* propagating the new visibility state to the variable the `Visible` property is bound to. This is the way to cancel the event and keep the dialog open.

> caption React to the user closing the Dialog.

<demo metaUrl="client/dialog/events/closing-2/" height="420"></demo>

> caption Prevent the user from closing the Dialog based on a condition.

<demo metaUrl="client/dialog/events/prevent-close-1/" height="420"></demo>

## See Also

* [Focus TextBox on Dialog Open](https://www.telerik.com/blazor-ui/documentation/knowledge-base/window-focus-button-textbox-on-open)
