# TextBoxExtensions

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 [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) class.

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

```csharp
public class TextBoxExtensions
```

{% endtab %}

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

```visual-basic
Public Class TextBoxExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AcceptsReturn\<TTextBox>(textBox, value)

Sets whether the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) control accepts the Return key.

| Parameter    | Type                                                                                                  | Description                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the AcceptsReturn property.                                                              |
| **value**    | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the Return key is accepted.                                                         |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated AcceptsReturn property.

This method allows you to configure the text box to accept or ignore the Return key.

```csharp

myTextBox.AcceptsReturn(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AcceptsTab\<TTextBox>(textBox, acceptTab)

Sets whether the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase) control accepts the Tab key.

| Parameter     | Type                                                                                                  | Description                                                                                                                    |
| ------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**  |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**   | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the AcceptsTab property.                                                                         |
| **acceptTab** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the Tab key is accepted.                                                                    |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated AcceptsTab property.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AllowDuplicateTags\<TTextBox>(tagTextBox, value)

Sets whether duplicate tags are allowed in the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the AllowDuplicateTags property.                                                     |
| **value**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether duplicate tags are allowed.                                                         |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated AllowDuplicateTags property.

This method allows you to specify whether the text box can accept duplicate tag entries.

```csharp

myTagTextBox.AllowDuplicateTags(false);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AutoComplete\<TTextBox>(textBox, autoComplete)

Sets the auto-complete behavior for the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter        | Type                                                                                                  | Description                                                                                                                    |
| ---------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**     |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**      | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the auto-complete behavior.                                                                      |
| **autoComplete** | [AutoComplete](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autocomplete)              | The auto-complete behavior to set.                                                                                             |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated auto-complete behavior.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AutoCompleteList\<TTextBox>(textBox, list)

Sets the list of auto-complete options for the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the auto-complete list.                                                                          |
| **list**     | [String\[\]](https://docs.microsoft.com/dotnet/api/system.string)                                     | An array of strings representing the auto-complete options.                                                                    |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated auto-complete list.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) BorderStyle\<TTextBox>(textBox, borderStyle)

Sets the border style of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter       | Type                                                                                                  | Description                                                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**    |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**     | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the border style.                                                                                |
| **borderStyle** | [BorderStyle](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.borderstyle)                | The border style to set.                                                                                                       |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated border style.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) CharacterCasing\<TTextBox>(textBox, characterCasing)

Sets the character casing for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter           | Type                                                                                                  | Description                                                                                                            |
| ------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**        |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**         | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the character casing.                                                                    |
| **characterCasing** | [CharacterCasing](https://docs.wisej.com/api/wisej.web/editors/wisej.web.charactercasing)             | The [CharacterCasing](#charactercasing``1) value to set.                                                               |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated character casing.

This method allows you to control the character casing for the text entered into the text box.

```csharp

myTextBox.CharacterCasing(CharacterCasing.Upper);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Checked\<TTextBox>(textBox, value)

Sets the checked state of the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter    | Type                                                                                                  | Description                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the checked state.                                                                       |
| **value**    | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating the checked state of the text box.                                                          |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated checked state.

This method allows you to set the checked state for a text box control that supports a checked property.

```csharp

myTextBox.Checked(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Culture\<TTextBox>(typedTextBox, cultureInfo)

Sets the culture information to use for displaying and interpreting the value in the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).                 |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the culture information to.                                                                                               |
| **cultureInfo**  | [CultureInfo](https://docs.microsoft.com/dotnet/api/system.globalization.cultureinfo)                 | The [CultureInfo](https://docs.microsoft.com/dotnet/api/system.globalization.cultureinfo) to use for formatting and parsing the value in the text box. |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the updated culture information.

This method allows you to set the culture information, which can affect how numbers, dates, and other data types are displayed or parsed in the typed text box.

```csharp

myTypedTextBox.Culture(new CultureInfo("en-US"));

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) CustomFormat\<TTextBox>(typedTextBox, customFormat)

Sets a custom format string for the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box for which to set the custom format.                                                                                 |
| **customFormat** | [String](https://docs.microsoft.com/dotnet/api/system.string)                                         | The custom format string to apply to the value in the text box.                                                                        |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the updated custom format.

This method allows you to define a custom format string for displaying the value within the typed text box.

```csharp

myTypedTextBox.CustomFormat("C2");

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Filter\<TTextBox>(textBox, filter)

Sets a filter string for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter    | Type                                                                                                  | Description                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the filter string.                                                                       |
| **filter**   | [String](https://docs.microsoft.com/dotnet/api/system.string)                                         | The filter string to apply to the text box.                                                                            |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the applied filter string.

This extension method allows you to apply a filter to the text box content, possibly for validation or searching purposes.

```csharp

myTextBox.Filter("^[a-zA-Z]+$");

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) InputType\<TTextBox>(textBox, value)

Sets the input type for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter    | Type                                                                                                  | Description                                                                                                       |
| ------------ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **TTextBox** |                                                                                                       | The type of the [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).                        |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) instance to set the input type for. |
| **value**    | [InputType](https://docs.wisej.com/api/wisej.web/editors/wisej.web.inputtype)                         | The input type to be set.                                                                                         |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) instance with the updated input type.

This method allows you to specify the input type for a [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) control, which can be useful for customizing the behavior of the text input.

```csharp

TextBox myTextBox = new TextBox();
myTextBox.InputType(InputType.Email);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Invalid\<TTextBox>(textBox, invalid)

Sets the invalid status of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the invalid status.                                                                              |
| **invalid**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the text box is invalid.                                                                    |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated invalid status.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) InvalidMessage\<TTextBox>(textBox, message)

Sets the invalid message for the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the invalid message.                                                                             |
| **message**  | [String](https://docs.microsoft.com/dotnet/api/system.string)                                         | The invalid message to display.                                                                                                |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated invalid message.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) KeepFormatOnEnter\<TTextBox>(typedTextBox, value)

Sets whether the format of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox) should be retained when the text box is entered.

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box for which to set the KeepFormatOnEnter property.                                                                    |
| **value**        | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the formatting should be retained on enter.                                                         |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the updated KeepFormatOnEnter property.

This method allows you to specify whether the formatting of the value should be retained when the text box is entered.

```csharp

myTypedTextBox.KeepFormatOnEnter(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) KeepWatermark\<TTextBox>(tagTextBox, value)

Sets whether the watermark text should remain visible when the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox) loses focus.

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the KeepWatermark property.                                                          |
| **value**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the watermark should remain visible when the text box loses focus.                  |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated KeepWatermark property.

This method allows you to specify whether the watermark text should persist when the text box loses focus.

```csharp

myTagTextBox.KeepWatermark(false);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Lines\<TTextBox>(textBox, lines)

Sets the lines of text in the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the lines of text.                                                                               |
| **lines**    | [String\[\]](https://docs.microsoft.com/dotnet/api/system.string)                                     | The lines of text to set.                                                                                                      |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated lines of text.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Max\<TInputType>(inputType, value)

Sets the maximum value for the input element.

| Parameter      | Type                                                                                                    | Description                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **TInputType** |                                                                                                         | The type of the input element, which must inherit from [InputType](#inputtype``1). |
| **inputType**  | [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The input element to set the maximum value for.                                    |
| **value**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           | The maximum value as a string.                                                     |

**Returns:** [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified input element with the specified maximum value.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) MaxLength\<TTextBox>(textBox, length)

Sets the maximum number of characters that can be entered into the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the maximum length.                                                                              |
| **length**   | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The maximum number of characters.                                                                                              |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated maximum length.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) MaxTagCount\<TTextBox>(tagTextBox, count)

Sets the maximum number of tags that can be added to the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the maximum tag count.                                                               |
| **count**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The maximum number of tags allowed.                                                                                    |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated maximum tag count.

This method allows you to specify the maximum number of tags that can be added to the tag text box. If more tags are added than the specified count, they may be ignored or removed.

```csharp

myTagTextBox.MaxTagCount(5);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) MaxTagWidth\<TTextBox>(tagTextBox, width)

Sets the maximum width for each tag in the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the maximum tag width.                                                               |
| **width**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The maximum width of each tag in pixels.                                                                               |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated maximum tag width.

This method allows you to limit the width of each tag within the tag text box. Tags exceeding the specified width may be truncated or otherwise adjusted.

```csharp

myTagTextBox.MaxTagWidth(100);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Min\<TInputType>(inputType, value)

Sets the minimum value for the input element.

| Parameter      | Type                                                                                                    | Description                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **TInputType** |                                                                                                         | The type of the input element, which must inherit from [InputType](#inputtype``1). |
| **inputType**  | [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The input element to set the minimum value for.                                    |
| **value**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           | The minimum value as a string.                                                     |

**Returns:** [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified input element with the specified minimum value.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Mode\<TInputType>(inputType, value)

Sets the mode of the input element.

| Parameter      | Type                                                                                                    | Description                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **TInputType** |                                                                                                         | The type of the input element, which must inherit from [InputType](#inputtype``1).                              |
| **inputType**  | [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The input element to set the mode for.                                                                          |
| **value**      | [TextBoxMode](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxmode)                       | The [TextBoxMode](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxmode) value to set as the mode. |

**Returns:** [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified input element with the specified mode.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Multiline\<TTextBox>(textBox, multiLine)

Sets the Multiline property for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox), enabling or disabling multiline text input.

| Parameter     | Type                                                                                                  | Description                                                                                                                  |
| ------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**  |                                                                                                       | The type of the text box, which must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**   | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the Multiline property.                                                                        |
| **multiLine** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether to enable multiline text input. Default is `false`.                                       |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The text box with the updated Multiline property.

This method allows you to specify whether the text box can accept multiple lines of text.

```csharp

myTextBox.Multiline(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnAcceptsTabChanged\<TTextBox>(textBox, action)

Adds an event handler for the AcceptsTabChanged event of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to attach the event handler to.                                                                                   |
| **action**   | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the AcceptsTab property changes.                                                                     |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The text box with the attached event handler.

This extension method allows you to easily attach an action to execute when the AcceptsTab property of the text box changes.

```csharp

myTextBox.OnAcceptsTabChanged(tb =>
{
AlertBox.Show("AcceptsTab property changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnCheckedChanged\<TTextBox>(textBox, action)

Sets a checked state change event handler for the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to attach the event handler to.                                                                                   |
| **action**   | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the checked state changes.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the attached CheckedChanged event handler.

This method allows you to add an event handler for the CheckedChanged event, which occurs when the checked state changes.

```csharp

myTextBox.OnCheckedChanged(tb =>
{
AlertBox.Show("Checked state changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnCultureChanged\<TTextBox>(typedTextBox, action)

Attaches an event handler for the CultureChanged event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the Culture property changes.                                                                                |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached CultureChanged event handler.

This method allows you to execute a custom action whenever the Culture property of the typed text box changes.

```csharp

myTypedTextBox.OnCultureChanged(tb =>
{
AlertBox.Show("Culture changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnCustomFormatChanged\<TTextBox>(typedTextBox, action)

Attaches an event handler for the CustomFormatChanged event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the CustomFormat property changes.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached CustomFormatChanged event handler.

This method allows you to execute a custom action whenever the CustomFormat property of the typed text box changes.

```csharp

myTypedTextBox.OnCustomFormatChanged(tb =>
{
AlertBox.Show("Custom format changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnFormat\<TTextBox>(typedTextBox, action)

Attaches an event handler for the Format event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox, ConvertEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)          | An action to execute during the Format event, with the text box and event arguments as parameters.                                     |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached Format event handler.

This method allows you to define custom formatting logic by executing a specified action during the Format event.

```csharp

myTypedTextBox.OnFormat((tb, args) =>
{
// Custom formatting logic
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnMultilineChanged\<TTextBox>(textBox, action)

Adds an event handler for the MultilineChanged event of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to attach the event handler to.                                                                                   |
| **action**   | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the Multiline property changes.                                                                      |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The text box with the attached event handler.

This extension method allows you to easily attach an action to execute when the Multiline property of the text box changes.

```csharp

myTextBox.OnMultilineChanged(tb =>
{
AlertBox.Show("Multiline property changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnParse\<TTextBox>(typedTextBox, action)

Attaches an event handler for the Parse event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox, ConvertEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)          | An action to execute during the Parse event, with the text box and event arguments as parameters.                                      |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached Parse event handler.

This method allows you to define custom parsing logic by executing a specified action during the Parse event.

```csharp

myTypedTextBox.OnParse((tb, args) =>
{
// Custom parsing logic
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnSeperatorCharChanged\<TTextBox>(tagTextBox, action)

Attaches an event handler for the SeparatorCharChanged event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the SeparatorChar property changes.                                                          |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached SeparatorCharChanged event handler.

This method allows you to add custom behavior when the SeparatorChar property of the tag text box changes.

```csharp

myTagTextBox.OnSeperatorCharChanged(tb =>
{
AlertBox.Show("Separator character changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagAdded\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagAdded event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)       | An action to execute when a tag is added.                                                                              |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagAdded event handler.

This method allows you to execute a custom action when a new tag is added to the tag text box.

```csharp

myTagTextBox.OnTagAdded((tb, args) =>
{
AlertBox.Show("Tag added: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagClick\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagClick event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxMousEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)   | An action to execute when a tag is clicked.                                                                            |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagClick event handler.

This method allows you to add an event handler for the TagClick event, executing a custom action when a tag is clicked.

```csharp

myTagTextBox.OnTagClick((tb, args) =>
{
AlertBox.Show("Tag clicked: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagDoubleClick\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagDoubleClick event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxMousEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)   | An action to execute when a tag is double-clicked.                                                                     |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagDoubleClick event handler.

This method allows you to add an event handler for the TagDoubleClick event, allowing you to define custom behavior when a tag is double-clicked.

```csharp

myTagTextBox.OnTagDoubleClick((tb, args) =>
{
AlertBox.Show("Tag double-clicked: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagRejected\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagRejected event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)       | An action to execute when a tag is rejected.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagRejected event handler.

This method allows you to add an event handler for the TagRejected event, which occurs when a tag is not accepted for some reason.

```csharp

myTagTextBox.OnTagRejected((tb, args) =>
{
AlertBox.Show("Tag rejected: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagRemoved\<TTextBox>(tagTextBox, action)

Adds an event handler for the TagRemoved event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)       | An action to execute when a tag is removed.                                                                            |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagRemoved event handler.

This extension method allows you to provide an action that will be executed when a tag is removed from the tag text box.

```csharp

myTagTextBox.OnTagRemoved((tb, args) =>
{
AlertBox.Show("Tag removed: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagRender\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagRender event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxRenderEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | An action to execute when a tag is rendered.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagRender event handler.

This method allows you to define a custom action for rendering tags within the tag text box.

```csharp

myTagTextBox.OnTagRender((tb, args) =>
{
// Custom rendering logic
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTagSelected\<TTextBox>(tagTextBox, action)

Attaches an event handler for the TagSelected event of the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box to attach the event handler to.                                                                       |
| **action**     | [Action\<TTextBox, TagTextBoxEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)       | An action to execute when a tag is selected.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the attached TagSelected event handler.

This method allows you to execute a custom action when a tag is selected within the tag text box.

```csharp

myTagTextBox.OnTagSelected((tb, args) =>
{
AlertBox.Show("Tag selected: " + args.Tag);
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnTextAlignChanged\<TTextBox>(textBox, action)

Attaches an event handler to the TextAlignChanged event of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to attach the event handler to.                                                                                   |
| **action**   | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the text alignment changes.                                                                          |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the attached TextAlignChanged event handler.

This method is used to add an event handler for the TextAlignChanged event, which occurs when the alignment of the text changes.

```csharp

myTextBox.OnTextAlignChanged(tb =>
{
AlertBox.Show("Text alignment changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnToolClick\<TTextBox>(textBox, action)

Attaches an event handler to the ToolClick event of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to attach the event handler to.                                                                                   |
| **action**   | [Action\<TTextBox, ToolClickEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)        | An action to execute when a tool is clicked.                                                                                   |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the attached ToolClick event handler.

This method is used to add an event handler for the ToolClick event, which occurs when a tool button is clicked.

```csharp

myTextBox.OnToolClick((tb, tool) =>
{
AlertBox.Show($"Tool clicked: {tool.ToolName}");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnValueChanged\<TTextBox>(typedTextBox, action)

Attaches an event handler for the ValueChanged event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the Value property changes.                                                                                  |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached ValueChanged event handler.

This method allows you to execute a custom action whenever the Value property of the typed text box changes.

```csharp

myTypedTextBox.OnValueChanged(tb =>
{
AlertBox.Show("Value changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnValueTypeChanged\<TTextBox>(typedTextBox, action)

Attaches an event handler for the ValueTypeChanged event of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box to attach the event handler to.                                                                                     |
| **action**       | [Action\<TTextBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                            | An action to execute when the ValueType property changes.                                                                              |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the attached ValueTypeChanged event handler.

This method enables the execution of a custom action whenever the ValueType property of the typed text box changes.

```csharp

myTypedTextBox.OnValueTypeChanged(tb =>
{
AlertBox.Show("Value type changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) PasswordChar\<TTextBox>(textBox, passwordChar)

Sets the password character for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter        | Type                                                                                                  | Description                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**      | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the password character.                                                                  |
| **passwordChar** | [Char](https://docs.microsoft.com/dotnet/api/system.char)                                             | The character to display for password input.                                                                           |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated password character.

This method allows you to specify a character to display in place of the actual characters typed for password input.

```csharp

myTextBox.PasswordChar('*');

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) ScrollBars\<TTextBox>(textBox, scrollBars)

Sets the scroll bars for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox). |
| **textBox**    | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the scroll bars.                                                                         |
| **scrollBars** | [ScrollBars](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.scrollbars)                  | The [ScrollBars](#scrollbars``1) value to set.                                                                         |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated scroll bars.

This method allows you to configure the scroll bars for the text box.

```csharp

myTextBox.ScrollBars(ScrollBars.Both);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Selectable\<TTextBox>(textBox, selectable)

Sets the selectable status of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter      | Type                                                                                                  | Description                                                                                                                    |
| -------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**   |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**    | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the selectable status.                                                                           |
| **selectable** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the text box is selectable.                                                                 |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated selectable status.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectedText\<TTextBox>(textBox, text)

Sets the selected text in the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the selected text.                                                                               |
| **text**     | [String](https://docs.microsoft.com/dotnet/api/system.string)                                         | The text to select.                                                                                                            |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated selected text.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectionLength\<TTextBox>(textBox, length)

Sets the length of the selected text in the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the selection length.                                                                            |
| **length**   | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The length of the selection.                                                                                                   |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated selection length.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectionStart\<TTextBox>(textBox, index)

Sets the starting position of the text selection in the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the selection start.                                                                             |
| **index**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The zero-based index of the selection start.                                                                                   |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated selection start.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectOnEnter\<TTextBox>(textBox, selectOnEnter)

Sets whether the entire text is selected when the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase) is entered.

| Parameter         | Type                                                                                                  | Description                                                                                                                    |
| ----------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**      |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**       | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the SelectOnEnter property.                                                                      |
| **selectOnEnter** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the text should be selected on enter.                                                       |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated SelectOnEnter property.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SeparatorChar\<TTextBox>(tagTextBox, separator)

Sets the character used to separate tags in the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the separator character.                                                             |
| **separator**  | [Char](https://docs.microsoft.com/dotnet/api/system.char)                                             | The character to use as a separator between tags.                                                                      |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated separator character.

This method allows you to customize the character that separates tags within the text box.

```csharp

myTagTextBox.SeparatorChar(',');

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) ShowToolTips\<TTextBox>(tagTextBox, value)

Sets whether tooltips are shown for tags in the specified [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox).

| Parameter      | Type                                                                                                  | Description                                                                                                            |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**   |                                                                                                       | The type of the tag text box, must inherit from [TagTextBox](https://docs.wisej.com/api/wisej.web/editors/tagtextbox). |
| **tagTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The tag text box for which to set the tooltips visibility.                                                             |
| **value**      | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether tooltips should be shown for tags.                                                  |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified tag text box with the updated tooltip visibility setting.

This extension method allows you to enable or disable the display of tooltips for tags within the text box. Tooltips can provide additional information about each tag.

```csharp

myTagTextBox.ShowToolTips(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SpellCheck\<TTextBox>(textBox, value)

Enables or disables spell checking for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter    | Type                                                                                                  | Description                                                                                                       |
| ------------ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **TTextBox** |                                                                                                       | The type of the [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).                        |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) instance to set spell checking for. |
| **value**    | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether spell checking should be enabled or disabled.                                  |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) instance with the updated spell check setting.

This method allows you to enable or disable spell checking for a [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) control, which can be useful for providing feedback on text input.

```csharp

TextBox myTextBox = new TextBox();
myTextBox.SpellCheck(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Step\<TInputType>(inputType, value)

Sets the step value for the input element.

| Parameter      | Type                                                                                                    | Description                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **TInputType** |                                                                                                         | The type of the input element, which must inherit from [InputType](#inputtype``1). |
| **inputType**  | [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The input element to set the step value for.                                       |
| **value**      | [Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1)                            | The step value as a nullable double. If null, the step attribute will be removed.  |

**Returns:** [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified input element with the specified step value.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) TextAlign\<TTextBox>(textBox, textAlign)

Sets the horizontal text alignment for the specified [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).

| Parameter     | Type                                                                                                   | Description                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**  |                                                                                                        | The type of the text box, must inherit from [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox).   |
| **textBox**   | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions)  | The text box for which to set the text alignment.                                                                        |
| **textAlign** | [HorizontalAlignment](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.horizontalalignment) | The [HorizontalAlignment](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.horizontalalignment) value to set. |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated text alignment.

This method allows you to set the horizontal alignment of text within the text box.

```csharp

myTextBox.TextAlign(HorizontalAlignment.Center);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Tools\<TTextBox>(textBox, toolBarButtons)

Adds a collection of tool bar buttons to the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter          | Type                                                                                                  | Description                                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**       |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).              |
| **textBox**        | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box to which the tool bar buttons will be added.                                                                                   |
| **toolBarButtons** | [ComponentTool\[\]](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool)             | An array of [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) representing the tool bar buttons to add. |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the added tool bar buttons.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Type\<TInputType>(inputType, value)

Sets the type of the input element.

| Parameter      | Type                                                                                                    | Description                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **TInputType** |                                                                                                         | The type of the input element, which must inherit from [InputType](#inputtype``1).                              |
| **inputType**  | [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The input element to set the type for.                                                                          |
| **value**      | [TextBoxType](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxtype)                       | The [TextBoxType](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxtype) value to set as the type. |

**Returns:** [TInputType](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified input element with the specified type.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Value\<TTextBox>(typedTextBox, value)

Sets the value of the specified [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox).

| Parameter        | Type                                                                                                  | Description                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **TTextBox**     |                                                                                                       | The type of the typed text box, must inherit from [TypedTextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.typedtextbox). |
| **typedTextBox** | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The typed text box for which to set the value.                                                                                         |
| **value**        | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                         | The value to be set in the typed text box.                                                                                             |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified typed text box with the updated value.

This method allows you to set a value into the typed text box, which will be converted to a string representation according to the text box's ValueType and Culture settings.

```csharp

myTypedTextBox.Value(123.45);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Watermark\<TTextBox>(textBox, watermark)

Sets the watermark text for the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter     | Type                                                                                                  | Description                                                                                                                    |
| ------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox**  |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**   | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the watermark text.                                                                              |
| **watermark** | [String](https://docs.microsoft.com/dotnet/api/system.string)                                         | The watermark text to display.                                                                                                 |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated watermark text.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) WordWrap\<TTextBox>(textBox, wrap)

Sets the word wrap status of the specified [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase).

| Parameter    | Type                                                                                                  | Description                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **TTextBox** |                                                                                                       | The type of the text box, must inherit from [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase). |
| **textBox**  | [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions) | The text box for which to set the word wrap status.                                                                            |
| **wrap**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                       | A boolean value indicating whether the text should wrap.                                                                       |

**Returns:** [TTextBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.textboxextensions). The modified text box with the updated word wrap status.
