skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadPopupHelper

Inheritance
System.Object
RadPopupHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.