# DesktopTaskBarItem

Namespace: **Wisej.Web**

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

* [Component](/api/wisej.base/general/wisej.base.component.md)
  * [Component](/api/wisej.web/general/wisej.web.component.md)
    * [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md)

Represents a component in the [Desktop](/api/wisej.web/containers/desktop.md) control's taskbar.

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

```csharp
public class DesktopTaskBarItem : Component
```

{% endtab %}

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

```visual-basic
Public Class DesktopTaskBarItem
    Inherits Component
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) DesktopTaskBarItem()

Initializes a new instance of the [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) DesktopTaskBarItem(text)

Initializes a new instance of the [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) class and displays the specified text on the item.

| Name     | Type                                                          | Description                                                                                                             |
| -------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **text** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The text to display on the new [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md). |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) AllowHtml

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the control can display html in the Text property. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Enabled

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the button is enabled. (Default: `True`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Image

[Image](https://docs.microsoft.com/dotnet/api/system.drawing.image): Returns or sets the image that is displayed in a [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md). (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ImagePosition

[ImagePosition](/api/wisej.web/enumerations/wisej.web.imageposition.md): Returns or sets the position of the [Image](#image) within this taskbar item. (Default: `Left`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageSource

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the theme name or URL for the image to display in the [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md). (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Name

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the name of the [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md). (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Parent

[Desktop](/api/wisej.web/containers/desktop.md): Returns the [Desktop](/api/wisej.web/containers/desktop.md) control that the taskbar item button is assigned to. (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Position

[LeftRightAlignment](/api/wisej.web/enumerations/wisej.web.leftrightalignment.md): Returns or sets the position of this [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) within the taskbar in the parent [Desktop](/api/wisej.web/containers/desktop.md). (Default: `Left`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Tag

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the object that contains user data. (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text displayed on the taskbar item. (Default: `""`)

When AllowHtml is set to true, the text can contain HTML content. If the text contains new lines (CRLF) but doesn't contain HTML elements (at least one "<") all CRLF are automatically substituted with "\<br/>".

### ![](/files/hsR4ok3152WyAf8J2C1u) ToolTipText

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text that appears as a ToolTip for the taskbar item. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Visible

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the taskbar item is visible or hidden. (Default: `True`)

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) Dispose(disposing)

Releases the resources used by the [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md).

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnAddReferences(items)

Returns a collection of referenced components or collection of components.

| Parameter | Type                                                                    | Description |
| --------- | ----------------------------------------------------------------------- | ----------- |
| **items** | [IList](https://docs.microsoft.com/dotnet/api/system.collections.ilist) |             |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Update()

Updates the component on the client. Overridden to repaint the taskbar in design mode.

## Inherited By

| Name                                                                                                    | Description                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DesktopTaskBarItemControl](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemcontrol.md)   | Represents a component in the [Desktop](/api/wisej.web/containers/desktop.md) control's taskbar that can host any [Control](/api/wisej.web/general/control.md). |
| [DesktopTaskBarItemDateTime](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemdatetime.md) | Represents a DateTime component in the [Desktop](/api/wisej.web/containers/desktop.md) control's taskbar.                                                       |

## Implements

| Name                                                                              | Description                                                                                                     |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                  |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | 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/containers/desktop/wisej.web.desktoptaskbaritem.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.
