menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IPopupParent - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IPopupParent

    A generic interface that defines a popup parent, that will control the alignment of a popup, etc.

    Inherited Members
    IPopupItem.GetPopupParentControl()
    IPopupItem.IsRelatedControl(Control, Boolean)
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public interface IPopupParent : IPopupItem
    Remarks

    Any object / control that wants to act as a popup's parent and participate in the popup framework should implement this interface.

    Take a look at the PopupsInDepth sample under the Tools\Samples\Editors Package\PopupControlContainer\Advanced folder for an implementation of this interface.

    Properties

    IsRightToLeft

    Indicates whether control's elements should be rendered right-to-left.

    Declaration
    bool IsRightToLeft { get; }
    Property Value
    Type
    System.Boolean

    Methods

    ChildClosing(IPopupChild, PopupCloseType)

    Will be called to indicate that the popup child was closed in the specified mode.

    Declaration
    void ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
    Parameters
    Type Name Description
    IPopupChild childUI

    The child that was closed.

    PopupCloseType popupCloseType

    A PopupCloseType value.

    GetBorderOverlapCue(PopupRelativeAlignment)

    Returns a line (defined by 2 points) in screen co-ordinates that indicates the border overlap between the child and parent.

    Declaration
    Point[] GetBorderOverlapCue(PopupRelativeAlignment relativeAlignment)
    Parameters
    Type Name Description
    PopupRelativeAlignment relativeAlignment

    The preferred alignment selected using the GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment) method.

    Returns
    Type Description
    System.Drawing.Point[]

    An array of 2 points representing a line (in screen co-ordinates) where the overlap takes place. NULL if no overlap is desired.

    Remarks

    If a valid line is provided, the popup child in that area will be drawn in an overlap style.

    GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment)

    Returns the location for popup, given the preferred relative alignments.

    Declaration
    Point GetLocationForPopupAlignment(PopupRelativeAlignment prevAlignment, out PopupRelativeAlignment newAlignment)
    Parameters
    Type Name Description
    PopupRelativeAlignment prevAlignment

    The previous alignment.

    PopupRelativeAlignment newAlignment

    The new alignment designated for the returned location.

    Returns
    Type Description
    System.Drawing.Point

    An ideal location for popup designated by one of the PopupRelativeAlignment values in newAlignment. Or returns a Point.Empty and set newAlignment to Default if you do not intend to provide multiple preferred locations.

    Remarks

    This method allows you to provide 8 different preferred positions for your popup, in any order.

    Different preferred positions are necessary because some positions may not be ideal for the popup as there may not be enough screen space for the popup when shown in that position.

    The popup will first call this method with prevAlignment set to Default. You should then return a location and designate this location as one of the 8 positions in the PopupRelativeAlignment enumeration using the newAlignment reference.

    The popup will then check if there is enough space in the screen to draw at this location. If not, it will call this method again with prevAlignment set to newAlignment from the previous call.

    This goes on until you return a location that the popup finds acceptable. However, if you run out of locations before the popup can find an acceptable location, then you should set newAlignment to Default. The popup will then assume that you don't have any more positions to supply and do the best it can with the supplied location.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved