# LinkLabel

The [LinkLabel](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.linklabel?view=net-5.0) control is similar to a [Label](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.label?view=net-5.0) control with the exception that it can display a hyperlink. Multiple hyperlinks can be specified in the text of the control. Each hyperlink can perform a different task within an application.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Link Area

Setting the `LinkArea` property of the `LinkLabel` control specifies the portion of text that will be shown as a hyperlink to the user.

![LinkLabel control with LinkArea property set to display first 4 characters as a link](/files/-MezEuMomI0f9gAy6zEi)

### Link Behavior

The behavior of the link can be configured to use one of the preset values:

* `SystemDefault`: The behavior of this setting depends on the browser.
* `AlwaysUnderline`: The link always displays with underlined text.
* `HoverUnderline`: The link displays underlined text only when the mouse is hovered over the link.
* `NeverUnderline`: The link text is never underlined.

![LinkLabel demonstrating different link behavior settings](/files/-MezHdbGfXYWsjrblEEO)

### Active Color

The `LinkLabel` selection color can be fully customized using the `ActiveLinkColor` property:

![LinkLabel showing different active link color options](/files/-MezJ9BTU00unrCT_wtn)

## How To

### Customize the Appearance

The `LinkLabel` control is fully customizable through the `Font`, `Text`, `AllowHTML`, and `AppearanceKey` properties.

#### Font

Like most other controls in Wisej.NET, the `LinkLabel` control has a `Font` property that allows for customization of the size, features, and style of font to use for the control.

![LinkLabel with custom font settings](/files/-Mgr8WGXgwCcca7NhxC-)

#### AllowHtml

When set to true, the `LinkLabel`'s `Text` property will be interpreted as HTML content, allowing for full customization of the control.

![LinkLabel with HTML content applied](/files/-Mgr80slrPYe81vg076q)

#### Appearance Key

The `AppearanceKey` property of the control can be used to give the `LinkLabel` a custom look. This can be based off of another control already defined in the theme (i.e. button) or as an entirely new appearance defined in a mixin.

{% code title="MyLinkLabel.mixin.theme" lineNumbers="true" %}

```json
{
    "appearances": {
        "mylinklabel": {
            "inherit": "linklabel",
            "states": {
                "default": {
                    "styles": {
                        "backgroundColor": "blue"
                    }
                }
            }
        }
    }
}
```

{% endcode %}

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Class name       | "wisej.web.LinkLabel"                                                                                                          |
| Theme appearance | "linklabel", inherits appearance from "textlabel". See [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements). |
| Child components | "linklabel" is the text container. See [JavaScript](/docs/concepts/javascript-object-model.md).                                |
| Source code      | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js)            |


---

# 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/docs/controls/content/linklabel.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.
