UserPopup
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Provides an popup container that can be attached to other controls.
- C#
- VB.NET
public class UserPopup : UserControl
Public Class UserPopup
Inherits UserControl
Constructors
UserPopup()
Initializes a new instance of the UserPopup control.
UserPopup(container)
Initializes a new instance of the UserPopup control.
| Name | Type | Description |
|---|---|---|
| container | IContainer | A IContainer that represents the container for the popup control. |
Properties
Alignment
Placement: Returns or sets the alignment side and position of the popup. The actual location depends on the placement methods defined by the PlacementModeX and PlacementModeY properties. (Default: BottomLeft)
AutoHide
Boolean: Determines whether the popup will close automatically when the user clicks outside of the control. (Default: True)
BackColor
Color: Returns or sets the background color for the control.
Offset
Padding: Returns or sets the offset in pixels from the calculated position of the popup.
Opener
IWisejComponent: Returns the opener Control. It may be null if the popup was shown without specifying an opener.
PlacementModeX
PlacementMode: Returns or sets the method used to calculate the position of the popup according to the value of the Alignment property. (Default: KeepAlign)
PlacementModeY
PlacementMode: Returns or sets the method used to calculate the position of the popup according to the value of the Alignment property. (Default: KeepAlign)
TabStop
Boolean: Returns or sets whether the user can give the focus to this control using the TAB key and the Focusable property is set to true. (Default: True)
Visible
Boolean: Returns or sets whether the control and all its child controls are displayed.
Methods
Close()
Closes the UserPopup.
OnClosed(e)
Fires the Closed event when the popup is closed.
OnWebEvent(e)
Processes the event from the client.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Event arguments. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
ShowPopup(opener, onclose)
Shows the UserPopup in relation to the specified opener .
| Parameter | Type | Description |
|---|---|---|
| opener | IWisejComponent | The IWisejComponent that this UserPopup is bound to. It can be any component that is visually displayed on the client side, including Control, DataGridViewColumn, ColumnHeader, DesktopTaskBarItem, ToolBarButton. |
| onclose | Action<UserPopup> | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the event. |
Throws:
- ArgumentNullException opener is null.
- ArgumentException opener is the same UserPopup.
ShowPopup(x, y, onclose)
Shows the UserPopup at the specified screen coordinates.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The horizontal position in pixels, relative to the screen. |
| y | Int32 | The vertical position in pixels, relative to the screen. |
| onclose | Action<UserPopup> | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the event. |
ShowPopup(location, onclose)
Shows the UserPopup at the specified screen location.
| Parameter | Type | Description |
|---|---|---|
| location | Point | The location in pixels, relative to the screen. |
| onclose | Action<UserPopup> | Optional async handler for the close event; called when the popup panel disappears. It's the equivalent of handling the event. |
ShowPopupAsync(opener)
Asynchronously displays the UserPopup in relation to the specified opener .
| Parameter | Type | Description |
|---|---|---|
| opener | IWisejComponent | The IWisejComponent that this UserPopup is bound to. It can be any component that is visually displayed on the client side, including Control, DataGridViewColumn, ColumnHeader, DesktopTaskBarItem, ToolBarButton. |
Returns: Task.
Throws:
- ArgumentNullException opener is null.
- ArgumentException opener is the same UserPopup.
ShowPopupAsync(x, y)
Asynchronously displays the UserPopup at the specified screen coordinates.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The horizontal position in pixels, relative to the screen. |
| y | Int32 | The vertical position in pixels, relative to the screen. |
Returns: Task.
ShowPopupAsync(location)
Asynchronously displays the UserPopup at the specified screen location.
| Parameter | Type | Description |
|---|---|---|
| location | Point | The location in pixels, relative to the screen. |
Returns: Task.
Events
Closed
EventHandler Fired when the UserPopup control is closed.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IContainerControl | Provides the functionality for a control to act as a parent for other controls. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |