> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstylecollection.md).

# TableLayoutStyleCollection

Namespace: **Wisej.Web**

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

Implements the basic functionality for a collection of table layout styles.

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

```csharp
public class TableLayoutStyleCollection : IList, ICollection, IEnumerable
```

{% endtab %}

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

```visual-basic
Public Class TableLayoutStyleCollection
    Inherits IList
    Implements ICollection, IEnumerable
```

{% endtab %}
{% endtabs %}

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Count

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets the number of styles actually contained in the [TableLayoutStyleCollection](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstylecollection.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) Item(index)

[TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md): Returns or sets [TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md) at the specified index.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The property value is already assigned to another owner. You must first remove it from its current location or clone it.

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u) Add(style)

Adds a new [TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md) to the end of the current collection.

| Parameter | Type                                                                                         | Description                                                                                                                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **style** | [TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md) | The [TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md) to add to the [TableLayoutStyleCollection](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstylecollection.md). |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The position into which the new element was inserted.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)*style* is already assigned to another owner. You must first remove it from its current location or clone it.

### ![](/files/hsR4ok3152WyAf8J2C1u) Clear()

Disassociates the collection from its associated [TableLayoutPanel](/api/wisej.web/containers/tablelayoutpanel.md) and empties the collection.

### ![](/files/hsR4ok3152WyAf8J2C1u) RemoveAt(index)

Removes the style at the specified index of the collection.

| Parameter | Type                                                        | Description                                                                                                                             |
| --------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based index of the [TableLayoutStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle.md) to be removed. |

## Inherited By

| Name                                                                                                                         | Description                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [TableLayoutColumnStyleCollection](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection.md) | A collection that stores [ColumnStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle.md) objects. |
| [TableLayoutRowStyleCollection](/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutrowstylecollection.md)       | A collection that stores [RowStyle](/api/wisej.web/containers/tablelayoutpanel/wisej.web.rowstyle.md) objects.       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/tablelayoutpanel/wisej.web.tablelayoutstylecollection.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.
