Class PopupHost
The top level form-derived class that hosts a PopupControlContainer when it is dropped-down.
Inheritance
Implements
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class PopupHost : DropDownWindow, IIgnoreWorkingArea
Remarks
You will normally not have to use this class or refer to an instance of this class. An instance of this class will be automatically generated by the PopupControlContainer which will then set this as its parent when ShowPopup(Point) is called on it.
However, you can for example access an instance of this class from the PopupControlContainer and change certain properties.
You can include a shadow in your popups by setting the NeedShadow property.
Constructors
PopupHost()
Creates a new instance of the PopupHost class.
Declaration
public PopupHost()
Properties
BorderGap
Declaration
protected int BorderGap { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
CurrentRAlign
Returns a PopupRelativeAlignment value indicating the current alignment of the popup window.
Declaration
public PopupRelativeAlignment CurrentRAlign { get; }
Property Value
| Type | Description |
|---|---|
| PopupRelativeAlignment | A PopupRelativeAlignment value. |
IgnoreWorkingArea
Gets or sets ignore working area when menu begin popup.
Declaration
public bool IgnoreWorkingArea { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
NeedShadow
Indicates whether a shadow should be drawn around the popup window.
Declaration
public virtual bool NeedShadow { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if a shadow is needed; False otherwise. |
OverlapBorderColor
Gets / sets the overlap border color with which this top-level form should be drawn.
Declaration
public Color OverlapBorderColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color | A color value. |
Remarks
This color will be used by this form only when the System.Windows.Forms.FormBorderStyle is set to None.
The form will draw a custom single-line border with this color and also draw the overlapped look, if overlapped borders are available.
PopupControl
Declaration
protected Control PopupControl { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.Control |
PopupControlContainer
Gets / sets the PopupControlContainer that this PopupHost will host.
Declaration
public IPopupControlContainer PopupControlContainer { get; set; }
Property Value
| Type | Description |
|---|---|
| IPopupControlContainer | An implementation of the IPopupControlContainer interface. |
Shadow
Declaration
protected ShadowWindow Shadow { get; }
Property Value
| Type |
|---|
| ShadowWindow |
Methods
AdjustLocationForAlignment(ref Point, PopupRelativeAlignment)
Declaration
protected void AdjustLocationForAlignment(ref Point loc, PopupRelativeAlignment align)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | loc | |
| PopupRelativeAlignment | align |
AttachPopup()
Declaration
protected virtual void AttachPopup()
ComputeControlLocation()
Declaration
protected virtual void ComputeControlLocation()
ComputeLayout()
Computes size and position of popup.
Declaration
protected void ComputeLayout()
ComputeMyLocation()
Declaration
protected virtual void ComputeMyLocation()
ComputeMySize()
Declaration
protected virtual void ComputeMySize()
CreateShadow()
Declaration
protected virtual void CreateShadow()
DetachPopup()
Declaration
protected virtual void DetachPopup()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
GetAdjustedLocation(Point)
Declaration
protected virtual Point GetAdjustedLocation(Point loc)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | loc |
Returns
| Type |
|---|
| System.Drawing.Point |
GetIsMirrored()
Declaration
protected bool GetIsMirrored()
Returns
| Type |
|---|
| System.Boolean |
HidePopup()
Hides the popup.
Declaration
public virtual void HidePopup()
IsShowing()
Declaration
public bool IsShowing()
Returns
| Type |
|---|
| System.Boolean |
OnDeactivate(EventArgs)
Declaration
protected override void OnDeactivate(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnHandleCreated(EventArgs)
Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
Overrides
OnLocationChanged(EventArgs)
Declaration
protected override void OnLocationChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnPaint(PaintEventArgs)
Overridden. See System.Windows.Forms.Control.OnPaint.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e |
OnSizeChanged(EventArgs)
Overridden. See System.Windows.Forms.Control.OnSizeChanged.
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
OnVisibleChanged(EventArgs)
Overridden. See System.Windows.Forms.Control.OnVisibleChanged.
Declaration
protected override void OnVisibleChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
ResumeLayout(Boolean)
Declaration
public void ResumeLayout(bool preformLayout)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | preformLayout |
ShowPopup()
Shows the popup.
Declaration
public virtual void ShowPopup()
SuspendLayout()
Declaration
public void SuspendLayout()
UpdateVisibility()
Updates popup host visibility and z-order.
Declaration
protected void UpdateVisibility()
WndProc(ref Message)
Overridden. See System.Windows.Forms.Control.WndProc.
Declaration
protected override void WndProc(ref Message m)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | m |