Class RadPopupHelper
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadPopupHelper
Constructors
RadPopupHelper()
Declaration
public RadPopupHelper()
Methods
ActivateForm(IntPtr)
Declaration
public static void ActivateForm(IntPtr form)
Parameters
|
System.IntPtr
form
|
EnsureBoundsInScreen(Rectangle, Rectangle)
Ensures a drop-down rectangle is entirely visible in a given screen rectangle.
Declaration
public static Rectangle EnsureBoundsInScreen(Rectangle popupBounds, Rectangle screenRect)
Parameters
|
System.Drawing.Rectangle
popupBounds
|
|
System.Drawing.Rectangle
screenRect
|
Returns
|
System.Drawing.Rectangle
|
GetScreen(Point)
Gets a screen from a point on the desktop.
Declaration
public static Screen GetScreen(Point pointInScreen)
Parameters
|
System.Drawing.Point
pointInScreen
The point on the desktop that must be in the returned screen. |
Returns
|
System.Windows.Forms.Screen
A Screen object that contains the given point or the PrimaryScreen on error. |
GetScreenRect(Point)
Gets the rectangle of the screen that contains given point on the desktop.
Declaration
public static Rectangle GetScreenRect(Point pointInScreen)
Parameters
|
System.Drawing.Point
pointInScreen
The point on the desktop that must be in the returned screen rectangle. |
Returns
|
System.Drawing.Rectangle
The rectangle of the primary screen on error. |
GetScreenRect(RadElement)
Gets the rectangle of the screen that contains the biggest part of a given element.
Declaration
public static Rectangle GetScreenRect(RadElement elementOnScreen)
Parameters
|
RadElement
elementOnScreen
If the element is not added in a control or is not visible the rectangle of the primary screen is returned. |
Returns
|
System.Drawing.Rectangle
The rectangle of the primary screen on error. |
GetValidLocationForContextMenu(RadDirection, Point, Size, ref Boolean)
Gets the valid location for a context menu
Declaration
public static Point GetValidLocationForContextMenu(RadDirection popupDirection, Point location, Size popupSize, ref bool corected)
Parameters
|
RadDirection
popupDirection
|
|
System.Drawing.Point
location
|
|
System.Drawing.Size
popupSize
|
|
System.Boolean
corected
|
Returns
|
System.Drawing.Point
|
GetValidLocationForDropDown(RadDirection, Rectangle, Size, Rectangle, Int32, ref Boolean)
Gets the valid location for a drop-down (for menus, combo boxes, etc.).
Declaration
public static Point GetValidLocationForDropDown(RadDirection popupDirection, Rectangle screenRect, Size popupSize, Rectangle ownerRect, int ownerOffset, ref bool corected)
Parameters
|
RadDirection
popupDirection
|
|
System.Drawing.Rectangle
screenRect
|
|
System.Drawing.Size
popupSize
|
|
System.Drawing.Rectangle
ownerRect
|
|
System.Int32
ownerOffset
Offset in pixels from the owner element. When this is zero there is no space between the owner and the drop-down. |
|
System.Boolean
corected
|
Returns
|
System.Drawing.Point
|
Remarks
The popup is not allowed to be outside the screen rectangle and to be shown over the ownerRect.
GetValidLocationForDropDown(RadDirection, Size, RadElement, Int32, ref Boolean)
Gets the valid location for a drop-down (for menus, combo boxes, etc.).
Declaration
public static Point GetValidLocationForDropDown(RadDirection popupDirection, Size popupSize, RadElement owner, int ownerOffset, ref bool corected)
Parameters
|
RadDirection
popupDirection
|
|
System.Drawing.Size
popupSize
|
|
RadElement
owner
|
|
System.Int32
ownerOffset
Offset in pixels from the owner element. When this is zero there is no space between the owner and the drop-down. |
|
System.Boolean
corected
|
Returns
|
System.Drawing.Point
|
Remarks
This method calculates:
1. The rectangle of the screen where the drop down should be shown
2. The rectangle (in screen coordinates) of the owner element. Owner element is the element that shows the drop-down and is connected to it - like a menu item that shows its sub menus or a combobox element that shows its drop-down.
After calculating the screen and the element rectangles this method calls the basic method.
SetTopMost(IntPtr)
Declaration
public static void SetTopMost(IntPtr handle)
Parameters
|
System.IntPtr
handle
|
SetVisibleCore(Control)
Declaration
public static bool SetVisibleCore(Control control)
Parameters
|
System.Windows.Forms.Control
control
|
Returns
|
System.Boolean
|
SetVisibleCore(Control, IntPtr)
Declaration
public static bool SetVisibleCore(Control control, IntPtr parentForm)
Parameters
|
System.Windows.Forms.Control
control
|
|
System.IntPtr
parentForm
|
Returns
|
System.Boolean
|
SetWindowPosition(IntPtr, IntPtr)
Declaration
public static void SetWindowPosition(IntPtr handle, IntPtr parentForm)
Parameters
|
System.IntPtr
handle
|
|
System.IntPtr
parentForm
|