# Desktop

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [ScrollableControl](/api/wisej.web/containers/scrollablecontrol.md)
    * [ContainerControl](/api/wisej.web/containers/containercontrol.md)
      * [Desktop](/api/wisej.web/containers/desktop.md)

Represents a desktop container that can host floating windows.

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

```csharp
public class Desktop : ContainerControl, IWisejWindow, IWisejDesignTarget
```

{% endtab %}

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

```visual-basic
Public Class Desktop
    Inherits ContainerControl
    Implements IWisejWindow, IWisejDesignTarget
```

{% endtab %}
{% endtabs %}

## Constructors

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

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

## Properties

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns true if this desktop instance is the currently active desktop. It is the same as comparing the instance with [Desktop](/api/wisej.web/general/application.md#desktop). (Default: `False`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the taskbar is hidden automatically when there are no opened windows or no windows with the property ShowInTaskbar set to true. (Default: `False`)

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

[Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle): Returns a rectangle that represents the inner dimensions of the [Desktop](/api/wisej.web/containers/desktop.md) control.

Default value is {X=0,Y=0,Width=200,Height=52} (System.Drawing.Rectangle)

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

[DockStyle](/api/wisej.web/enumerations/wisej.web.dockstyle.md): Returns or sets which control borders are docked to its parent control and determines how a control is resized with its parent. (Default: `None`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the height of the page.

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

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

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

[DesktopTaskBarItemCollection](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemcollection.md): Returns the collection of [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) controls displayed in the taskbar of the desktop control.

The default value is a new DesktopTaskBarItemCollection

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

[Point](https://docs.microsoft.com/dotnet/api/system.drawing.point): Returns or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the height and width of the page.

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

[HorizontalAlignment](/api/wisej.web/enumerations/wisej.web.horizontalalignment.md): Return or sets the alignment of the [Items](#items) in the taskbar. (Default: `Left`)

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

[Position](/api/wisej.web/enumerations/wisej.web.position.md): Return or sets the position of the taskbar to one of the four sides indicated by the [Position](/api/wisej.web/enumerations/wisej.web.position.md) values. (Default: `Bottom`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the height or width of the taskbar in the current theme, depending on the value of [TaskbarPosition](#taskbarposition).

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the title of the [Desktop](/api/wisej.web/containers/desktop.md). If the desktop is the main desktop, setting the text also changes the title in the browser. (Default: `""`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the wallpaper image. (Default: `""`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the width of the page.

## Methods

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

Disposes the page and related resources.

| 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) OnActivated(e)

Fires the [Activated](#activated) 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. |

### ![](/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) OnCreateControl()

Creates the page.

### ![](/files/lzopMboA31bVq8UIcbT3) OnDeactivate(e)

Fires the [Deactivate](#deactivate) event.

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

### ![](/files/hsR4ok3152WyAf8J2C1u) OnItemClick(e)

Fires the [ItemClick](#itemclick) event.

| Parameter | Type                                                                                                                | Description                                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [DesktopTaskBarItemClickEventArgs](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventargs.md) | A [DesktopTaskBarItemClickEventArgs](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventargs.md) that contains the event data. |

### ![](/files/hsR4ok3152WyAf8J2C1u) OnItemDoubleClick(e)

Fires the [ItemClick](#itemclick) event.

| Parameter | Type                                                                                                                | Description                                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [DesktopTaskBarItemClickEventArgs](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventargs.md) | A [DesktopTaskBarItemClickEventArgs](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventargs.md) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnLoad(e)

Fires the [Load](#load) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnParentChanged(e)

Raises the [ParentChanged](/api/wisej.web/general/control.md#parentchanged) event.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnParentVisibleChanged(e)

Fires the [VisibleChanged](/api/wisej.web/general/control.md#visiblechanged) event when the [Visible](/api/wisej.web/general/control.md#visible) property value of the control's container changes.

| 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnTaskbarAlignmentChanged(e)

Fires the [TaskbarAlignmentChanged](#taskbaralignmentchanged) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnTaskbarPositionChanged(e)

Fires the [TaskbarPositionChanged](#taskbarpositionchanged) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnTaskbarVisibleChanged(e)

Fires the [TaskbarVisibleChanged](#taskbarvisiblechanged) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

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

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

Renders the client component.

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

## Events

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the desktop becomes active, and it's the new [Desktop](/api/wisej.web/general/application.md#desktop).

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the desktop is deactivated and it's no longer the [Desktop](/api/wisej.web/general/application.md#desktop).

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

[DesktopTaskBarItemClickEventHandler](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventhandler.md) Fired when a [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) on the [Desktop](/api/wisej.web/containers/desktop.md) is clicked.

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

[DesktopTaskBarItemClickEventHandler](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritemclickeventhandler.md) Fired when a [DesktopTaskBarItem](/api/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md) on the [Desktop](/api/wisej.web/containers/desktop.md) is double clicked.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired before the desktop becomes visible for the first time.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Occurs when the property [TaskbarAlignment](#taskbaralignment) changes value.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Occurs when the property [TaskbarPosition](#taskbarposition) changes value.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Occurs when the property AutoHideTaskbar is set to true and the TaskBar is either hidden or shown.

## 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.       |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                         |
| [IContainerControl](/api/wisej.web/interfaces/wisej.web.icontainercontrol.md)     | Provides the functionality for a control to act as a parent for other controls.                                       |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                        |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface. |
| [IWisejWindow](/api/wisej.core/interfaces/wisej.core.iwisejwindow.md)             | All wisej top-level windows 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.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.
