# Events

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

* Splitter
  * [OnCollapse](https://www.telerik.com/blazor-ui/documentation/components/splitter/events#oncollapse)
  * [OnExpand](https://www.telerik.com/blazor-ui/documentation/components/splitter/events#onexpand)
  * [OnResize](https://www.telerik.com/blazor-ui/documentation/components/splitter/events#onresize)
* Pane
  * [SizeChanged](https://www.telerik.com/blazor-ui/documentation/components/splitter/events#sizechanged)
  * [CollapsedChanged](https://www.telerik.com/blazor-ui/documentation/components/splitter/events#collapsedchanged)

## OnCollapse

The `OnCollapse` event fires when a pane is collapsed. It receives the index of the pane that was collapsed in its event arguments.

If you set the `ShouldRender` field of the event arguments to `true`, the component will re-render after the event (it will call `StateHasChanged()`). This can be useful if you need to change its parameters or state during the event execution and especially if you need to execute `async` logic in the event handler.

> caption Handling the OnCollapse event of the splitter

<demo metaUrl="client/splitter/events/example-5/" height="420"></demo>

## OnExpand

The `OnExpand` event fires when a pane is expanded. It receives the index of the pane that was expanded in its event arguments.

If you set the `ShouldRender` field of the event arguments to `true`, the component will re-render after the event (it will call `StateHasChanged()`). This can be useful if you need to change its parameters or state during the event execution and especially if you need to execute `async` logic in the event handler.

> caption Handling the OnExpand event of the splitter

<demo metaUrl="client/splitter/events/example-4/" height="420"></demo>

## OnResize

The `OnResize` event fires after the user has finished resizing a pane (after the mouse button is released). It fires for each resized pane and receives the index and new size in its event arguments.

If you set the `ShouldRender` field of the event arguments to `true`, the component will re-render after the event (it will call `StateHasChanged()`). This can be useful if you need to change its parameters or state during the event execution and especially if you need to execute `async` logic in the event handler.

> caption Handle the OnResize event of the splitter

<demo metaUrl="client/splitter/events/example-3/" height="420"></demo>

## SizeChanged

The `SizeChanged` event is triggered when the `Size` parameter of the corresponding pane is changed.

> caption Handle the SizeChanged event of a Splitter Pane

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

## CollapsedChanged

The `CollapsedChanged` event is triggered when the `Collapsed` parameter of the corresponding pane is changed.

> caption Handle the CollapsedChanged event of a Splitter Pane

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

## See Also

* [Splitter Overview](https://www.telerik.com/blazor-ui/documentation/components/splitter/overview)
