# UserPopup

Namespace: **Wisej.Web**

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

* [Control](/api/v3.0/wisej.web/general/control.md)
  * [ScrollableControl](/api/v3.0/wisej.web/containers/scrollablecontrol.md)
    * [ContainerControl](/api/v3.0/wisej.web/containers/containercontrol.md)
      * [UserControl](/api/v3.0/wisej.web/containers/wisej.web.usercontrol.md)
        * [UserPopup](/api/v3.0/wisej.web/containers/wisej.web.userpopup.md)

Provides an popup container that can be attached to other controls.

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

```csharp
public class UserPopup : UserControl
```

{% endtab %}

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

```visual-basic
Public Class UserPopup
    Inherits UserControl
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/uCY6T77rh488FWHzpJ6P)UserPopup()

Initializes a new instance of the UserPopup control.

### ![](/files/uCY6T77rh488FWHzpJ6P)UserPopup(container)

Initializes a new instance of the UserPopup control.

| Name          | Type                                                                                       | Description                                                                                                                                       |
| ------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **container** | [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) | A [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) that represents the container for the popup control. |

## Properties

### ![](/files/uCY6T77rh488FWHzpJ6P)Alignment

[Placement](/api/v3.0/wisej.web/enumerations/wisej.web.placement.md): Returns or sets the alignment side and position of the popup. The actual location depends on the placement methods defined by the [PlacementX](#placementx) and [PlacementY](#placementy) properties.

### ![](/files/uCY6T77rh488FWHzpJ6P)AutoHide

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Determines whether the popup will close automatically when the user clicks outside of the control.

### ![](/files/uCY6T77rh488FWHzpJ6P)BackColor

[Color](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.color): Returns or sets the background color for the control.

### ![](/files/uCY6T77rh488FWHzpJ6P)Offset

[Padding](/api/v3.0/wisej.web/general/wisej.web.padding.md): Returns or sets the offset in pixels from the calculated position of the popup.

### ![](/files/uCY6T77rh488FWHzpJ6P)Opener

[IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md): Returns the opener [Control](/api/v3.0/wisej.web/general/control.md). It may be null if the popup was shown without specifying an opener.

### ![](/files/uCY6T77rh488FWHzpJ6P)PlacementModeX

[PlacementMode](/api/v3.0/wisej.web/enumerations/wisej.web.placementmode.md): Returns or sets the method used to calculate the position of the popup according to the value of the [Alignment](#alignment) property.

### ![](/files/uCY6T77rh488FWHzpJ6P)PlacementModeY

[PlacementMode](/api/v3.0/wisej.web/enumerations/wisej.web.placementmode.md): Returns or sets the method used to calculate the position of the popup according to the value of the [Alignment](#alignment) property.

### ![](/files/uCY6T77rh488FWHzpJ6P)TabStop

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

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

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the control and all its child controls are displayed.

## Methods

### ![](/files/uCY6T77rh488FWHzpJ6P)Close()

Closes the UserPopup.

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopup(opener, onclose)

Shows the UserPopup in relation to the specified *opener* .

| Parameter   | Type                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **opener**  | [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md) | The [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md) that this UserPopup is bound to. It can be any component that is visually displayed on the client side, including [Control](/api/v3.0/wisej.web/general/control.md), [DataGridViewColumn](/api/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md), [ColumnHeader](/api/v3.0/wisej.web/lists-and-grids/listview/wisej.web.columnheader.md), [DesktopTaskBarItem](/api/v3.0/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md), [ToolBarButton](/api/v3.0/wisej.web/containers/toolbar/wisej.web.toolbarbutton.md). |
| **onclose** | [Action\<UserPopup>](https://docs.microsoft.com/en-us/dotnet/api/system.action)  | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the [event.](#closed)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopup(x, y, onclose)

Shows the UserPopup at the specified screen coordinates.

| Parameter   | Type                                                                            | Description                                                                                                                               |
| ----------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **x**       | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)               | The horizontal position in pixels, relative to the screen.                                                                                |
| **y**       | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)               | The vertical position in pixels, relative to the screen.                                                                                  |
| **onclose** | [Action\<UserPopup>](https://docs.microsoft.com/en-us/dotnet/api/system.action) | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the [event.](#closed) |

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopup(location, onclose)

Shows the UserPopup at the specified screen location.

| Parameter    | Type                                                                            | Description                                                                                                                               |
| ------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **location** | [Point](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.point)       | The location in pixels, relative to the screen.                                                                                           |
| **onclose**  | [Action\<UserPopup>](https://docs.microsoft.com/en-us/dotnet/api/system.action) | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the [event.](#closed) |

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopupAsync(opener)

Asynchronously displays the UserPopup in relation to the specified *opener* .

| Parameter  | Type                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **opener** | [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md) | The [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md) that this UserPopup is bound to. It can be any component that is visually displayed on the client side, including [Control](/api/v3.0/wisej.web/general/control.md), [DataGridViewColumn](/api/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md), [ColumnHeader](/api/v3.0/wisej.web/lists-and-grids/listview/wisej.web.columnheader.md), [DesktopTaskBarItem](/api/v3.0/wisej.web/containers/desktop/wisej.web.desktoptaskbaritem.md), [ToolBarButton](/api/v3.0/wisej.web/containers/toolbar/wisej.web.toolbarbutton.md). |

**Returns:** [Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task).

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopupAsync(x, y)

Asynchronously displays the UserPopup at the specified screen coordinates.

| Parameter | Type                                                              | Description                                                |
| --------- | ----------------------------------------------------------------- | ---------------------------------------------------------- |
| **x**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The horizontal position in pixels, relative to the screen. |
| **y**     | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The vertical position in pixels, relative to the screen.   |

**Returns:** [Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task).

### ![](/files/uCY6T77rh488FWHzpJ6P)ShowPopupAsync(location)

Asynchronously displays the UserPopup at the specified screen location.

| Parameter    | Type                                                                      | Description                                     |
| ------------ | ------------------------------------------------------------------------- | ----------------------------------------------- |
| **location** | [Point](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.point) | The location in pixels, relative to the screen. |

**Returns:** [Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task).

## Events

### ![](/files/uCY6T77rh488FWHzpJ6P)Closed

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the UserPopup control is closed.

## Implements

| Name                                                                                   | Description                                                                                                                |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](/api/v3.0/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                              |
| [IContainerControl](/api/v3.0/wisej.web/interfaces/wisej.web.icontainercontrol.md)     | Provides the functionality for a control to act as a parent for other controls.                                            |
| [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                             |
| [IWisejControl](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/v3.0/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/v3.0/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/v3.0/wisej.web/containers/wisej.web.userpopup.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.
