# Window Actions

The Window offers action buttons in its titlebar:

* [Built-in actions](https://www.telerik.com/blazor-ui/documentation/components/window/actions#built-in-actions)
  * `Maximize`
  * `Minimize`
  * `Close`
* [Custom action buttons](https://www.telerik.com/blazor-ui/documentation/components/window/actions#custom-actions)

To define action buttons, populate the `WindowActions` tag of the Window with `WindowAction` instances.

## Action Parameters

Action buttons expose the following properties:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter | Type and Default Value          | Description                                                                                                                                                                          |
| --------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Name`    | `string`                        | The name of the action. Can be one of the built-in actions (see above), or a custom action name.                                                                                     |
| `Hidden`  | `bool`                          | Sets if the action button is rendered. Do not use for the `Minimize` and `Maximize` actions, because the Window manages their visibility internally, based on the component state.   |
| `OnClick` | `EventCallback<MouseEventArgs>` | An event handler to respond to custom action clicks.                                                                                                                                 |
| `Icon`    | `string`                        | The CSS class of the icon to be rendered. Use with the [Telerik font icons](https://www.telerik.com/blazor-ui/documentation/common-features/icons), or set your own font icon class. |
| `Title`   | `string`                        | The `title` HTML attribute of the action button.                                                                                                                                     |

## Built-in Actions

> caption The built-in actions of a Window

<demo metaUrl="client/window/actions/example-1/" height="420"></demo>

> Setting custom icons for the built-in actions is not supported. If you need to specify a custom icon for a built-in action, use a [custom action](https://www.telerik.com/blazor-ui/documentation/components/window/actions#custom-actions) instead.

## Custom Actions

You can create a custom action icon and you must provide its `OnClick` handler.

> caption Handling a custom action

<demo metaUrl="client/window/actions/example-2/" height="420"></demo>

## See Also

* [(Demo) Window Actions](https://demos.telerik.com/blazor-ui/window/actions)
* [(KB) Keep Content in the DOM When the Window Is Closed](https://www.telerik.com/blazor-ui/documentation/knowledge-base/window-keep-content-when-closed)
