# StatusBarExtensions

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 [StatusBar](/api/wisej.web/containers/statusbar.md) class.

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

```csharp
public class StatusBarExtensions
```

{% endtab %}

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

```visual-basic
Public Class StatusBarExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) OnPanelClick\<TStatusBar>(statusBar, action)

Attaches an event handler for the PanelClick event of the specified [StatusBar](/api/wisej.web/containers/statusbar.md).

| Parameter      | Type                                                                                                       | Description                                                                                        |
| -------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **TStatusBar** |                                                                                                            | The type of the status bar, must inherit from [StatusBar](/api/wisej.web/containers/statusbar.md). |
| **statusBar**  | [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md)                     | The status bar to attach the event handler to.                                                     |
| **action**     | [Action\<TStatusBar, StatusBarPanelClickEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | An action to execute when a panel in the status bar is clicked.                                    |

**Returns:** [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md). The modified status bar with the attached PanelClick event handler.

This method allows you to execute a custom action whenever a panel in the status bar is clicked.

```csharp

myStatusBar.OnPanelClick((sb, args) =>
{
AlertBox.Show("Panel clicked!");
});

```

### ![](/files/lIX317sDtMTZJBi9oSIx) Panels\<TStatusBar>(statusBar, panels)

Adds the specified panels to the Panels collection of the specified [StatusBar](/api/wisej.web/containers/statusbar.md).

| Parameter      | Type                                                                                   | Description                                                                                                             |
| -------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TStatusBar** |                                                                                        | The type of the status bar, must inherit from [StatusBar](/api/wisej.web/containers/statusbar.md).                      |
| **statusBar**  | [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md) | The status bar to which the panels should be added.                                                                     |
| **panels**     | [StatusBarPanel\[\]](/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel.md)  | An array of [StatusBarPanel](/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel.md) to add to the status bar. |

**Returns:** [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md). The modified status bar with the added panels.

This method allows you to add multiple panels to the status bar in one call.

```csharp

myStatusBar.Panels(panel1, panel2, panel3);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) ShowPanels\<TStatusBar>(statusBar, value)

Sets the ShowPanels property of the specified [StatusBar](/api/wisej.web/containers/statusbar.md).

| Parameter      | Type                                                                                   | Description                                                                                        |
| -------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **TStatusBar** |                                                                                        | The type of the status bar, must inherit from [StatusBar](/api/wisej.web/containers/statusbar.md). |
| **statusBar**  | [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md) | The status bar for which to set the ShowPanels property.                                           |
| **value**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                        | A boolean indicating whether panels are shown in the status bar.                                   |

**Returns:** [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md). The modified status bar with the updated ShowPanels property.

This method allows you to enable or disable the display of panels in the status bar.

```csharp

myStatusBar.ShowPanels(true);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) SizingGrip\<TStatusBar>(statusBar, value)

Sets the SizingGrip property of the specified [StatusBar](/api/wisej.web/containers/statusbar.md).

| Parameter      | Type                                                                                   | Description                                                                                        |
| -------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **TStatusBar** |                                                                                        | The type of the status bar, must inherit from [StatusBar](/api/wisej.web/containers/statusbar.md). |
| **statusBar**  | [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md) | The status bar for which to set the SizingGrip property.                                           |
| **value**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                        | A boolean indicating whether the sizing grip is shown on the status bar.                           |

**Returns:** [TStatusBar](/api/wisej.web.markup/extensions/wisej.web.markup.statusbarextensions.md). The modified status bar with the updated SizingGrip property.

This method allows you to enable or disable the display of the sizing grip on the status bar.

```csharp

myStatusBar.SizingGrip(true);

```


---

# 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.statusbarextensions.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.
