# RadioButton

Namespace: **Wisej.Web**

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

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [ButtonBase](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.buttonbase)
    * [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton)

Enables the user to select a single option from a group of choices when paired with other [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton) controls.

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

```csharp
public class RadioButton : ButtonBase, IReadOnly, IValidation
```

{% endtab %}

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

```visual-basic
Public Class RadioButton
    Inherits ButtonBase
    Implements IReadOnly, IValidation
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton) class.

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

Initializes a new instance of the [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton) class with the specified settings.

| Name                 | Type                                                                                | Description                                         |
| -------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------- |
| **text**             | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial text.                                       |
| **onCheckedChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [CheckedChanged](#checkedchanged) handler. |

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

Initializes a new instance of the [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton) class with specific initial settings.

| Name                 | Type                                                                                | Description                                         |
| -------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------- |
| **text**             | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial text.                                       |
| **location**         | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.                                   |
| **size**             | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.                                       |
| **onCheckedChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [CheckedChanged](#checkedchanged) handler. |

## Properties

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

[Appearance](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.appearance): Returns or sets the value that determines the appearance of a [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox) control. (Default: `Normal`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or set a value indicating whether the [Checked](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#checked) or [CheckState](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#checkstate) values and the [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox)'s appearance are automatically changed when the [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox) is clicked. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates whether the control resizes based on its contents. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether a tooltip is displayed when the text extends beyond the size of the control. (Default: `False`)

The auto tooltip is set on the browser using the [title](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title) attribute managed by the browser, does not use the themed tooltip managed by Wisej.NET.

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

[ContentAlignment](https://docs.microsoft.com/dotnet/api/system.drawing.contentalignment): Returns or sets the horizontal and vertical alignment of the check mark on a [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox) control. (Default: `MiddleLeft`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets whether the control is checked. (Default: `False`)

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

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the text color used when the [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton) is checked. (Default: `Color [Empty]`)

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the default size of the control.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates that the control is invalid. (Default: `False`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the invalid message that is shown in the invalid tooltip. (Default: `""`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the control is read-only. (Default: `False`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the user can give the focus to this control using the TAB key and the [Focusable](https://docs.wisej.com/api/general/control#focusable) property is set to true. (Default: `False`)

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

[ContentAlignment](https://docs.microsoft.com/dotnet/api/system.drawing.contentalignment): Returns or sets the alignment of the text on the [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox) control. (Default: `MiddleLeft`)

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAppearanceChanged(e)

Fires the [AppearanceChanged](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#appearancechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnCheckedChanged(e)

Fires the [CheckedChanged](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#checkedchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnClick(e)

Fires the [Click](https://docs.wisej.com/api/general/control#click) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnForeColorChanged(e)

Fires the [ForeColorChanged](https://docs.wisej.com/api/general/control#forecolorchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnReadOnlyChanged(e)

Fires the [ReadOnlyChanged](#readonlychanged) event.

| Parameter | Type                                                                | Description                                                                                          |
| --------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnValidating(e)

Fires the [Validating](https://docs.wisej.com/api/general/control#validating) event.

| Parameter | Type                                                                                           | Description                                                                                         |
| --------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [CancelEventArgs](https://docs.microsoft.com/dotnet/api/system.componentmodel.canceleventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

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

Generates a [Click](https://docs.wisej.com/api/general/control#click) event for a [RadioButton](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.radiobutton).

## Events

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Appearance](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#appearance) property changes.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Checked](https://docs.wisej.com/api/wisej.web/wisej.web.checkbox#checked) property changes.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [ReadOnly](#readonly) property has changed.

## Implements

| Name                                                                                                 | Description                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                                               |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                                                 |
| [ICommandSource](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommandsource)           | Defines an object that can invoke a [Command](https://docs.wisej.com/api/interfaces/wisej.web.icommandsource#command).                                        |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                                        |
| [IImage](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iimage)                           | Provides access to common image properties across the controls that implement this interface.                                                                 |
| [IReadOnly](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ireadonly)                     | Provides access to the [ReadOnly](https://docs.wisej.com/api/interfaces/wisej.web.ireadonly#readonly) property for coontrols that support the read-only mode. |
| [IValidation](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ivalidation)                 | Provides access to the validation events and properties property for controls that support validation.                                                        |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                                                |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface.                      |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                                         |


---

# 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/buttons/wisej.web.radiobutton.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.
