Interface IPopupParent
A generic interface that defines a popup parent, that will control the alignment of a popup, etc.
Namespace: Syncfusion.WinForms.Core.Interfaces
Assembly: Syncfusion.Core.WinForms.dll
Syntax
public interface IPopupParent : IPopup
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
Gets a value indicating whether control's elements should be rendered right-to-left.
Declaration
bool IsRightToLeft { get; }
Property Value
Type |
---|
System.Boolean |
Methods
ChildClosing(IPopupChild, PopupCloseAction)
Will be called to indicate that the popup child was closed in the specified mode.
Declaration
void ChildClosing(IPopupChild childUI, PopupCloseAction popupCloseType)
Parameters
Type | Name | Description |
---|---|---|
IPopupChild | childUI | The child that was closed. |
PopupCloseAction | popupCloseType | A |
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 new Alignment. Or returns a Point.Empty and set newAlignment to Center 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 previous Alignment set to Center. 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 previous Alignment 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 Center. 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.