# LinkLabel

Namespace: **Wisej.Web**

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

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [Label](https://docs.wisej.com/api/wisej.web/content/wisej.web.label)
    * [LinkLabel](https://docs.wisej.com/api/wisej.web/content/linklabel)

Represents an hyper-link control.

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

```csharp
public class LinkLabel : Label
```

{% endtab %}

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

```visual-basic
Public Class LinkLabel
    Inherits Label
```

{% 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) LinkLabel()

Initializes a new default instance of the [LinkLabel](https://docs.wisej.com/api/wisej.web/content/linklabel) 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) LinkLabel(text, onLinkClicked)

Initializes a new instance of the [LinkLabel](https://docs.wisej.com/api/wisej.web/content/linklabel) class with the specified text.

| Name              | Type                                                                                                    | Description                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **text**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           | The text to display on the [LinkLabel](https://docs.wisej.com/api/wisej.web/content/linklabel). |
| **onLinkClicked** | [Action\<Object, LinkLabelLinkClickedEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The event handler that executes when the link area is clicked.                                  |

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

Initializes a new instance of the [Label](https://docs.wisej.com/api/wisej.web/content/wisej.web.label) class.

| 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.                                                  |
| **onLinkClicked** | [Action\<Object, LinkLabelLinkClickedEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The event handler that executes when the link area is clicked. |

## 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) ActiveLinkColor

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the color used to display an active link (while being pressed).

Default value is Color.Red.

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

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the color used when displaying a disabled link.

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

[LinkArea](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linkarea): Returns or sets the range in the text to treat as a link.

Default value is a [LinkArea](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linkarea) with Start=0, Length = -1 **Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The [Start](https://docs.wisej.com/api/wisej.web/content/wisej.web.linkarea#start) property of the [LinkArea](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linkarea) object is less than zero; or the [Length](https://docs.wisej.com/api/wisej.web/content/wisej.web.linkarea#length) property of the [LinkArea](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linkarea) object is less than -1.

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

[LinkBehavior](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.linkbehavior): Returns or sets a value that represents the behavior of a link. (Default: `SystemDefault`)

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

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the color used when displaying a link.

Default value is Color.Blue

### ![](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. (Default: `False`)

## 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) 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) | 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) OnLinkClicked(e)

Fires the [LinkClicked](#linkclicked) event.

| Parameter | Type                                                                                                                            | Description                                                                                                                                                     |
| --------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [LinkLabelLinkClickedEventArgs](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linklabellinkclickedeventargs) | A [LinkLabelLinkClickedEventArgs](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linklabellinkclickedeventargs) 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) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                                           | Description      |
| --------- | ------------------------------------------------------------------------------ | ---------------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) | Event arguments. |

### ![](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 the [LinkLabel](https://docs.wisej.com/api/wisej.web/content/linklabel) control.

## 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) LinkClicked

[LinkLabelLinkClickedEventHandler](https://docs.wisej.com/api/wisej.web/content/linklabel/wisej.web.linklabellinkclickedeventhandler) Fired when a link is clicked within 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) TabStopChanged

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

## 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.                                                                                                            |
| [IButtonControl](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ibuttoncontrol)           | Allows a control to act like a button on a [Form](https://docs.wisej.com/api/wisej.web/containers/form).                                                 |
| [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.                                                                                   |
| [IErrorProvider](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ierrorprovider)           | Exposes a common api implemented by components that can collect errors in relation to a [Control](https://docs.wisej.com/api/wisej.web/general/control). |
| [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.                                                            |
| [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.                                                                                                                    |
