# UpDownControlExtensions

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 [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md) class.

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

```csharp
public class UpDownControlExtensions
```

{% endtab %}

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

```visual-basic
Public Class UpDownControlExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyle\<TUpDownControl>(upDownControl, borderStyle)

Sets the BorderStyle property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                               |
| ------------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **TUpDownControl** |                                                                                                |                                           |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.             |
| **borderStyle**    | [BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle.md)                            | The border style to apply to the control. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) Editable\<TUpDownControl>(upDownControl, editable)

Sets the Editable property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                       |
| ------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                   |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                     |
| **editable**       | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                | Indicates whether the control should be editable. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) HideUpDownButtons\<TUpDownControl>(upDownControl, hideUpDownButtons)

Sets the HideUpDownButtons property of the specified UpDown control.

| Parameter             | Type                                                                                           | Description                                             |
| --------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| **TUpDownControl**    |                                                                                                |                                                         |
| **upDownControl**     | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                           |
| **hideUpDownButtons** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                | Indicates whether the up-down buttons should be hidden. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control with up-down buttons hidden.

### ![](/files/lIX317sDtMTZJBi9oSIx) InterceptArrowKeys\<TUpDownControl>(upDownControl, interceptArrowKeys)

Sets the InterceptArrowKeys property of the specified UpDown control.

| Parameter              | Type                                                                                           | Description                                               |
| ---------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| **TUpDownControl**     |                                                                                                |                                                           |
| **upDownControl**      | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                             |
| **interceptArrowKeys** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                | Indicates whether arrow key events should be intercepted. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) Invalid\<TUpDownControl>(upDownControl, invalid)

Sets the Invalid property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                     |
| ------------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                 |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                   |
| **invalid**        | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                | Indicates whether the current value is invalid. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) InvalidMessage\<TUpDownControl>(upDownControl, invalidMessage)

Sets the InvalidMessage property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                       |
| ------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                   |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                     |
| **invalidMessage** | [String](https://docs.microsoft.com/dotnet/api/system.string)                                  | The message to display when the input is invalid. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) OnSelectedItemChanged\<TDomainUpDownControl>(domainUpDownControl, action)

Attaches an event handler to the SelectedItemChanged event of a [DomainUpDown](/api/wisej.web/editors/domainupdown.md) control.

| Parameter                | Type                                                                                                 | Description                                                              |
| ------------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **TDomainUpDownControl** |                                                                                                      | The type of the domain up-down control.                                  |
| **domainUpDownControl**  | [TDomainUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The domain up-down control to which the event handler is to be attached. |
| **action**               | [Action\<TDomainUpDownControl>](https://docs.microsoft.com/dotnet/api/system.action-1)               | The action to perform when the SelectedItemChanged event is triggered.   |

**Returns:** [TDomainUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The domain up-down control with the event handler attached.

### ![](/files/lIX317sDtMTZJBi9oSIx) OnSortedItemChanged\<TDomainUpDownControl>(domainUpDownControl, action)

Attaches an event handler to the SortedChanged event of a [DomainUpDown](/api/wisej.web/editors/domainupdown.md) control.

| Parameter                | Type                                                                                                 | Description                                                              |
| ------------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **TDomainUpDownControl** |                                                                                                      | The type of the domain up-down control.                                  |
| **domainUpDownControl**  | [TDomainUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The domain up-down control to which the event handler is to be attached. |
| **action**               | [Action\<TDomainUpDownControl>](https://docs.microsoft.com/dotnet/api/system.action-1)               | The action to perform when the SortedChanged event is triggered.         |

**Returns:** [TDomainUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The domain up-down control with the event handler attached.

### ![](/files/lIX317sDtMTZJBi9oSIx) SelectOnEnter\<TUpDownControl>(upDownControl, selectOnEnter)

Sets the SelectOnEnter property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                                                 |
| ------------------ | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                                             |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                                               |
| **selectOnEnter**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                | Indicates whether the text should be selected when the control gains focus. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) TextAlign\<TUpDownControl>(upDownControl, textAlign)

Sets the TextAlign property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                              |
| ------------------ | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                          |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                            |
| **textAlign**      | [HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md)            | The horizontal alignment of the text within the control. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) UpDownAlign\<TUpDownControl>(upDownControl, upDownAlign)

Sets the UpDownAlign property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                                                         |
| ------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **TUpDownControl** |                                                                                                |                                                                     |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify.                                       |
| **upDownAlign**    | [HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md)            | The horizontal alignment of the up-down buttons within the control. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control.

### ![](/files/lIX317sDtMTZJBi9oSIx) Wrap\<TUpDownControl>(upDownControl)

Enables the Wrap property of the specified UpDown control.

| Parameter          | Type                                                                                           | Description                   |
| ------------------ | ---------------------------------------------------------------------------------------------- | ----------------------------- |
| **TUpDownControl** |                                                                                                |                               |
| **upDownControl**  | [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md) | The UpDown control to modify. |

**Returns:** [TUpDownControl](/api/wisej.web.markup/extensions/wisej.web.markup.updowncontrolextensions.md). The modified UpDown control with wrapping enabled.


---

# Agent Instructions: Querying This Documentation

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

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

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

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

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