# Events

The ToolBar exposes events for its [built-in buttons](https://www.telerik.com/blazor-ui/documentation/components/toolbar/built-in-tools) which allow you to react when the user perform actions on them. Such actions would be a click event or changing the selected state for the toggle button. The available events are:

* [OnClick](https://www.telerik.com/blazor-ui/documentation/components/toolbar/events#onclick)
* [SelectedChanged](https://www.telerik.com/blazor-ui/documentation/components/toolbar/events#selectedchanged)

For [custom (templated) items](https://www.telerik.com/blazor-ui/documentation/components/toolbar/templated-item), handle the corresponding events exposed by the components/elements you place inside them.

## OnClick

The `OnClick` event fires when the user clicks on a button in the ToolBar (also applicable to toggle buttons).

> caption The OnClick event for the ToolBar buttons

<demo metaUrl="client/toolbar/events/example-1/" height="420"></demo>

## SelectedChanged

The `SelectedChanged` event will fire when the user changes the state of the [`ToolBarToggleButton`](https://www.telerik.com/blazor-ui/documentation/components/toolbar/built-in-tools#toolbartogglebutton). It is used for one-way data binding of the `Selected` parameter and will prevent you from using two-way data binding (`@bind-Selected`)

> caption The SelectedChanged event for the ToolBarToggleButton

<demo metaUrl="client/toolbar/events/example-2/" height="420"></demo>

## See Also

* [Live Demo: ToolBar Overview](https://demos.telerik.com/blazor-ui/toolbar/overview)
* [ToolBar Overview](https://www.telerik.com/blazor-ui/documentation/components/toolbar/overview)
