# StatusBar.StatusBarPanelCollection

Namespace: **Wisej.Web**

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

Represents the collection of [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) controls in a [StatusBar](https://docs.wisej.com/api/wisej.web/containers/statusbar) control.

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

```csharp
public class StatusBarPanelCollection : IList, ICollection, IEnumerable, IList<StatusBarPanel>, ICollection<StatusBarPanel>, IEnumerable<StatusBarPanel>
```

{% endtab %}

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

```visual-basic
Public Class StatusBarPanelCollection
    Inherits IList
    Implements ICollection, IEnumerable, IList(Of StatusBarPanel), ICollection(Of StatusBarPanel), IEnumerable(Of StatusBarPanel)
```

{% endtab %}
{% endtabs %}

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IsReadOnly

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether this collection is read-only.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Item(index)

[StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel): Returns or sets the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) at the specified index.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Item(name)

[StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel): Returns the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) identified by the name.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Add(text)

Adds a [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified text to the collection.

| Parameter | Type                                                          | Description                                                                                                                                |
| --------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **text**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | The text for the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) that is being added. |

**Returns:** [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel). A [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) that represents the panel that was added to the collection.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Add(panel)

Adds a [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to the collection.

| Parameter | Type                                                                                                 | Description                                                                                                                                                |
| --------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **panel** | [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | A [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) that represents the panel to add to the collection. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the item in the collection.

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) being added to the collection was null.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The parent of the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) specified in the *panel* parameter is not null.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AddRange(panels)

Adds an array of [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to the collection.

| Parameter  | Type                                                                                                     | Description                                                                                                                                     |
| ---------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **panels** | [StatusBarPanel\[\]](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | Array of [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) objects to add to the collection. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Clear()

Removes all panels from the collection.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Clear(dispose)

Removes and optionally disposes all [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) objects from the collection.

| Parameter   | Type                                                            | Description                                                                                                                                                    |
| ----------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **dispose** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | Indicates whether the removed [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) objects should be disposed. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Contains(panel)

Determines whether the specified [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) is located within the collection.

| Parameter | Type                                                                                                 | Description                                                                                                                           |
| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **panel** | [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | The [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to locate in the collection. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) is located within the collection; otherwise, false.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ContainsKey(key)

Determines whether the collection contains a [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified key.

| Parameter | Type                                                          | Description                                     |
| --------- | ------------------------------------------------------------- | ----------------------------------------------- |
| **key**   | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the item to find in the collection. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true to indicate the collection contains a [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified key; otherwise, false.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetEnumerator()

Returns an enumerator to use to iterate through the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) objects in the collection.

**Returns:** [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator). An [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator) that represents the item collection.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IndexOf(panel)

Returns the index within the collection of the specified [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel).

| Parameter | Type                                                                                                 | Description                                                                                                                           |
| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **panel** | [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | The [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to locate in the collection. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index where the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) is located within the collection; otherwise, negative one (-1).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IndexOfKey(key)

Returns the index of the first occurrence of a [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified key.

| Parameter | Type                                                          | Description                                                                                                                                     |
| --------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **key**   | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to find in the collection. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the first occurrence of the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified key, if found; otherwise, -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Insert(index, panel)

Inserts the specified [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) into the collection at the specified index.

| Parameter | Type                                                                                                 | Description                                                                                                                              |
| --------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                          | The zero-based index location where the panel is inserted.                                                                               |
| **panel** | [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | A [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) representing the panel to insert. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The *panel* parameter is null.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The *panel* parameter's parent is not null.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The *index* parameter is less than zero or greater than the value of the [Count](#count) property of the [StatusBarPanelCollection](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbar.statusbarpanelcollection) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Remove(panel)

Removes the specified [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) from the collection.

| Parameter | Type                                                                                                 | Description                                                                                                                                                    |
| --------- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **panel** | [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) | The [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) representing the panel to remove from the collection. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) assigned to the *panel* parameter is null.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RemoveAt(index)

Removes the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) located at the specified index within the collection.

| Parameter | Type                                                        | Description                                 |
| --------- | ----------------------------------------------------------- | ------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based index of the item to remove. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The *index* parameter is less than zero or greater than or equal to the value of the [Count](#count) property of the [StatusBarPanelCollection](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbar.statusbarpanelcollection) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RemoveByKey(key)

Removes the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) with the specified key from the collection.

| Parameter | Type                                                          | Description                                                                                                                                         |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **key**   | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the [StatusBarPanel](https://docs.wisej.com/api/wisej.web/containers/statusbar/wisej.web.statusbarpanel) to remove from the collection. |


---

# 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/containers/statusbar/wisej.web.statusbar.statusbarpanelcollection.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.
