Events
The ToolBar exposes events for its built-in buttons 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:
For custom (templated) items, 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).
The OnClick event for the ToolBar buttons
SelectedChanged
The SelectedChanged event will fire when the user changes the state of the 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)
The SelectedChanged event for the ToolBarToggleButton