Class PopupControl
Implements popup control which is shown inside client area of another control.
public class PopupControl : Border, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
- Inheritance
-
PopupControl
- Implements
- Derived
Constructors
- PopupControl()
Initializes a new instance of the PopupControl class.
Properties
- AcceptOnLostFocus
Gets or sets whether popup should be closed with Accepted result when it lost focus.
- AcceptOnSpace
Gets or sets a value indicating whether a popup window disappears automatically when the user presses "Space" key.
- AcceptOnTab
Gets or sets a value indicating whether a popup window disappears automatically when the user presses "Tab" key.
- AllowNegativeLocation
Gets or sets whether negative X or Y location is allowed. Default is False.
- Bounds
Gets or sets the AbstractControl bounds relative to the parent, in device-independent units.
- CancelOnLostFocus
Gets or sets whether popup should be closed with Canceled result when it lost focus.
- ClosedAction
Gets or sets the action to be executed when the popup is closed.
- Container
Gets or sets container where popup will be shown.
- ExcludedArea
Gets or sets the area that should not be covered by the popup.
- FitIntoParent
Gets or sets whether to adjust size of the popup to fit into the parent's client area. Default is True.
- FitParentScrollbars
Gets or sets a value indicating whether the control should adjust its size to fit within the scrollable area of its parent. Default is True.
- FocusContainerOnClose
Gets or sets whether to focus Container when popup is closed.
- FocusParentOnShow
Gets or sets whether to focus parent control when popup is shown.
- HideOnClickParent
Gets or sets a value indicating whether a popup disappears automatically when the user clicks mouse outside it in the client area of the parent control.
- 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 disappears automatically when the user presses "Escape" key.
- HideOnMouseLeave
Gets or sets a value indicating whether a popup disappears automatically when the mouse pointer leaves the popup control.
- HideOnSiblingHide
Gets or sets a value indicating whether the popup should be closed when any sibling control is hidden.
- HideOnSiblingShow
Gets or sets a value indicating whether the popup should be closed when any sibling control is shown.
- MinLocation
Gets or sets minimal possible popup window location.
- PopupCloseReason
Gets or sets the reason why popup was closed.
- 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.
- Reason
Gets or sets the reason why popup was closed.
- SuppressParentKeyDown
Gets or sets a value indicating whether parent key down event should be suppressed.
- SuppressParentKeyPress
Gets or sets a value indicating whether parent key press event should be suppressed.
Methods
- Close()
Closes popup window and raises Closed event. This is equivalent to calling Close(PopupCloseReason?) with null reason.
- Close(ModalResult, PopupCloseReason?)
Sets PopupResult and calls Close(PopupCloseReason?).
- Close(PopupCloseReason?)
Closes popup window and raises Closed event.
- CloseWhenIdle(ModalResult, PopupCloseReason?)
Closes popup control when application goes to the idle state.
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.
- EnsureVisible(ref PointD, RectD, bool)
Adjusts the specified position to ensure that the associated rectangle is fully visible within the given container bounds.
- GetContainer()
Retrieves the container associated with the current control.
- GetContainerFontHeight()
Calculates the height of the font used by the container.
- GetContainerRect()
Calculates the bounding rectangle of the container in which popup can be displayed.
- GetContainerScrollbarSize()
Calculates the size of the scrollbar corner for the container.
- GetMaxPopupSize()
Gets maximal size of the popup. Returns Null if size is not limited.
- GetPopupResult(PopupCloseReason)
Gets popup result using the specified PopupControl.CloseReason.
- HideWhenSiblingHidden(AbstractControl)
Determines whether the current control should be hidden when a specified sibling control is hidden. HideOnSiblingHide must be set to true for this method to be called.
- HideWhenSiblingShown(AbstractControl)
Determines whether the current control should be hidden when a specified sibling control is shown. HideOnSiblingShow must be set to true for this method to be called.
- OnBeforeChildKeyDown(object?, KeyEventArgs)
Called before the KeyDown event of the child control is raised.
- OnChildLostFocus(object?, LostFocusEventArgs)
This method is invoked when the control's child lost focus.
- OnLostFocus(EventArgs)
This method is invoked when the control lost focus.
- OnParentChanged(EventArgs)
Called when Parent property is changed.
- OnSiblingVisibleChanged(AbstractControl)
Handles the event triggered when the visibility of a sibling control changes.
- OnVisibleChanged(EventArgs)
Called when the value of the Visible property changes.
- UpdateMaxPopupSize()
Updates maximal popup size.
Events
- Closed
Occurs when popup is closed