Table of Contents

Class PopupWindow<T>

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

This class displays content in a separate window that floats over the current application window.

public class PopupWindow<T> : Window, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, INotifyDataErrorInfo, IWindow, IControl, IDisposable, IWin32Window, ILayoutItem where T : AbstractControl, new()

Type Parameters

T

Type of the main control.

Inheritance
PopupWindow<T>
Implements
Derived

Constructors

PopupWindow()

Initializes a new instance of the PopupWindow<T> class.

Fields

DefaultHasAdditionalBorder

Gets or sets whether popup window has an additional border by default.

Properties

BottomToolBar

Gets bottom toolbar with 'Ok', 'Cancel' and other buttons.

ButtonIdCancel

Gets 'Cancel' button id.

ButtonIdOk

Gets 'Ok' button id.

CanShowPopup

Gets a value indicating whether a popup can be displayed.

DefaultBottomToolBarPadding

Gets or sets default bottom toolbar padding.

DefaultCloseEnabled

Gets default value of the CloseEnabled property.

DefaultHasTitleBar

Gets default value of the HasTitleBar property.

DefaultMaximizeEnabled

Gets default value of the MaximizeEnabled property.

DefaultMinimizeEnabled

Gets default value of the MinimizeEnabled property.

DefaultPadding

Gets or sets default popup window padding.

DefaultTopMost

Gets default value of the TopMost property.

FocusPopupOwnerOnHide

Gets or sets whether to focus PopupOwner control when popup is closed.

HideOnClick

Gets or sets a value indicating whether a popup window disappears automatically when the user clicks left mouse button.

HideOnDeactivate

Gets or sets a value indicating whether a popup window disappears automatically when the user clicks mouse outside it or if it loses focus in any other way.

HideOnDoubleClick

Gets or sets a value indicating whether a popup window disappears automatically when the user double clicks left mouse button.

HideOnEnter

Gets or sets a value indicating whether a popup window disappears automatically when the user presses "Enter" key.

HideOnEscape

Gets or sets a value indicating whether a popup window disappears automatically when the user presses "Escape" key.

IsPopupAccepted

Gets whether popup was accepted.

MainControl

Gets or sets main control used in the popup window.

MainPanel

Gets main panel (parent of the main control).

PopupLocationIncrement

Gets or sets the increment of the popup window location. This is used to ensure that the popup window does not overlap owner control.

PopupOwner

Gets or sets owner of the popup window.

PopupResult

Gets or sets the popup result value, which is updated when popup is closed. This property is set to None at the moment when popup is shown.

ShowCancelButton

Gets or sets whether 'Cancel' button is visible.

ShowOkAndCancel

Gets or sets whether 'Ok' and 'Cancel' buttons are visible.

ShowOkButton

Gets or sets whether 'Ok' button is visible.

Subscriber

Gets the ControlSubscriber associated with the notification system. This subscriber is used to manage notifications related to the popup window. It is automatically added to the global notification system when the popup window is shown and removed when it is hidden.

WasShown

Gets whether popup window was already shown at least one time.

Methods

BeforeShowPopup()

Called before popup is shown.

BindEvents(AbstractControl?)

Override to bind events to the main control of the popup window.

CreateMainControl()

Creates main control of the popup window.

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

FocusMainControl()

Focuses MainControl.

GetButtonVisible(ObjectUniqueId)

Gets whether specified toolbar button is visible.

GetInteriorSize(InteriorSizeFlags)

Calculates the interior size of the control based on the specified flags.

GetVisiblePopups<T1>()

Gets collection of the visible popup windows of the specified type. Result is sorted by last activation time.

HideOnClickPoint(PointD)

Gets whether mouse click on the specified point in the control closes popup window.

HidePopup(ModalResult, bool)

Hides popup window.

OnClosing(WindowClosingEventArgs)

Raises the Closing event and calls OnClosing(WindowClosingEventArgs). See Closing event description for more details.

OnKeyDown(KeyEventArgs)

Called when the KeyDown event is raised.

OnMainControlMouseDoubleClick(object?, MouseEventArgs)

Default implementation of the left mouse button double click event for the main control of the popup window.

OnMainControlMouseLeftButtonUp(object?, MouseEventArgs)

Default implementation of the left mouse button up event for the popup control.

OnVisibleChanged(EventArgs)

Called when the value of the Visible property changes.

SetButtonVisible(ObjectUniqueId, bool)

Sets whether specified toolbar button is visible.

SetClientSizeTo(SizeD?)

Sets client size to the specified value.

SetPositionInDips(PointD, SizeD, HVDropDownAlignment?)

Move the popup window to the right position, i.e. such that it is entirely visible.

ShowPopup(AbstractControl, HVDropDownAlignment?)

Displays a popup window near the specified control. If position is not specified, the popup is shown below and to the left of the control.

ShowPopup(PointD?, SizeD, HVDropDownAlignment?)

Shows popup at the specified location.

ShowPopup(HorizontalAlignment?, VerticalAlignment?, Display?, bool)

Shows popup window using the specified options. This method aligns popup window location inside the specified display's client area using given horizontal and vertical alignment.

UnbindEvents(AbstractControl?)

Override to unbind events to the main control of the popup window.