• Product Bundles

    DevCraft

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

    • Conversational UI
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for Xamarin
    Desktop
    UI for WinForms UI for WPF UI for WinUI UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    Debugging
    FiddlerCore Fiddler Everywhere
    CMS
    Sitefinity
    UX Design
    Unite UX
    Document Management
    Telerik Document Processing
    Innovations Lab
    VR DataViz
    Free Tools
    Fiddler Classic JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Edit Profile
    • Payment Profiles
    • Renewals & Upgrades
    • Support Tickets
    • 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>>)

Was this article helpful?

Tell us how we can improve this article

Skip
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.