# ToolBarExtensions

Namespace: **Wisej.Web.Markup**

Assembly: **Wisej.Framework** (4.0.0.0)

Adds [fluent markup](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/markup) extension methods to the [ToolBar](/api/wisej.web/containers/toolbar.md) class.

{% tabs %}
{% tab title="C#" %}

```csharp
public class ToolBarExtensions
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ToolBarExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) AutoOverflow\<TToolBar>(toolBar, autoOverflow)

Configures the auto overflow behavior of the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter        | Type                                                                               | Description                                                         |
| ---------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **TToolBar**     |                                                                                    |                                                                     |
| **toolBar**      | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md) | The toolbar to modify.                                              |
| **autoOverflow** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                    | Specifies whether the toolbar should automatically handle overflow. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyle\<TToolBar>(toolBar, borderStyle)

Sets the border style of the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter       | Type                                                                               | Description                |
| --------------- | ---------------------------------------------------------------------------------- | -------------------------- |
| **TToolBar**    |                                                                                    |                            |
| **toolBar**     | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md) | The toolbar to modify.     |
| **borderStyle** | [BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle.md)                | The border style to apply. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.

### ![](/files/lIX317sDtMTZJBi9oSIx) Buttons\<TToolBar>(toolBar, toolBarButtons)

Adds an array of [ToolBarButton](/api/wisej.web/containers/toolbar/wisej.web.toolbarbutton.md) to the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter          | Type                                                                               | Description                        |
| ------------------ | ---------------------------------------------------------------------------------- | ---------------------------------- |
| **TToolBar**       |                                                                                    |                                    |
| **toolBar**        | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md) | The toolbar to modify.             |
| **toolBarButtons** | [ToolBarButton\[\]](/api/wisej.web/containers/toolbar/wisej.web.toolbarbutton.md)  | The buttons to add to the toolbar. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.

### ![](/files/lIX317sDtMTZJBi9oSIx) ImageList\<TToolBar>(toolBar, imageList)

Assigns an [ImageList](#imagelist``1) to the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter     | Type                                                                               | Description              |
| ------------- | ---------------------------------------------------------------------------------- | ------------------------ |
| **TToolBar**  |                                                                                    |                          |
| **toolBar**   | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md) | The toolbar to modify.   |
| **imageList** | [ImageList](/api/wisej.web/content/imagelist.md)                                   | The ImageList to assign. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.

### ![](/files/lIX317sDtMTZJBi9oSIx) OnButtonClick\<TToolBar>(toolbar, action)

| Parameter    | Type                                                                                                    | Description |
| ------------ | ------------------------------------------------------------------------------------------------------- | ----------- |
| **TToolBar** |                                                                                                         |             |
| **toolbar**  | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md)                      |             |
| **action**   | [Action\<TToolBar, ToolBarButtonClickEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) |             |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md).

### ![](/files/lIX317sDtMTZJBi9oSIx) OnButtonDropDown\<TToolBar>(toolbar, action)

| Parameter    | Type                                                                                                    | Description |
| ------------ | ------------------------------------------------------------------------------------------------------- | ----------- |
| **TToolBar** |                                                                                                         |             |
| **toolbar**  | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md)                      |             |
| **action**   | [Action\<TToolBar, ToolBarButtonClickEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) |             |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md).

### ![](/files/lIX317sDtMTZJBi9oSIx) ShowToolTips\<TToolBar>(toolBar, showToolTips)

Configures whether tooltips are shown on the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter        | Type                                                                               | Description                         |
| ---------------- | ---------------------------------------------------------------------------------- | ----------------------------------- |
| **TToolBar**     |                                                                                    |                                     |
| **toolBar**      | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md) | The toolbar to modify.              |
| **showToolTips** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                    | Specifies whether to show tooltips. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.

### ![](/files/lIX317sDtMTZJBi9oSIx) TextAlign\<TToolBar>(toolBar, toolBarTextAlign)

Sets the text alignment on the specified [ToolBar](/api/wisej.web/containers/toolbar.md).

| Parameter            | Type                                                                                | Description                |
| -------------------- | ----------------------------------------------------------------------------------- | -------------------------- |
| **TToolBar**         |                                                                                     |                            |
| **toolBar**          | [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md)  | The toolbar to modify.     |
| **toolBarTextAlign** | [ToolBarTextAlign](/api/wisej.web/containers/toolbar/wisej.web.toolbartextalign.md) | The text alignment to set. |

**Returns:** [TToolBar](/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md). The modified toolbar.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.toolbarextensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
