skip navigation
  • Product Bundles

    DevCraft

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

    • NEW: Design Kits for Figma
    • 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 .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    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
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadContextMenu

Represents a context menu

Inheritance
System.Object
RadContextMenu
GanttViewDefaultContextMenu
PdfViewerContextMenu
PivotGridContextMenuBase
PropertyGridDefaultContextMenu
SchedulerDefaultContextMenu
TextBoxControlDefaultContextMenu
TreeViewDefaultContextMenu
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

[TelerikToolboxCategory("Menus & Toolbars")]
[RadToolboxItem(false)]
public class RadContextMenu : Component, IAnalyticsProvider

Constructors

RadContextMenu()

Declaration
public RadContextMenu()

RadContextMenu(IContainer)

Declaration
public RadContextMenu(IContainer owner)
Parameters
System.ComponentModel.IContainer owner

RadContextMenu(RadElement)

Declaration
public RadContextMenu(RadElement ownerElement)
Parameters
RadElement ownerElement

Properties

AnalyticsName

Declaration
public string AnalyticsName { get; set; }
Property Value
System.String

Implements
IAnalyticsProvider.AnalyticsName

AnimationEnabled

Gets or sets a bool value determining whether popup animation is enabled.

Declaration
public bool AnimationEnabled { get; set; }
Property Value
System.Boolean

AnimationFrames

Gets or sets the count of the frames of the drop down animation.

Declaration
public int AnimationFrames { get; set; }
Property Value
System.Int32

AnimationType

Gets or sets a value determining what animation type to use when showing the popup.

Declaration
public PopupAnimationTypes AnimationType { get; set; }
Property Value
PopupAnimationTypes

DropDown

Gets menu drop down panel

Declaration
public RadDropDownMenu DropDown { get; }
Property Value
RadDropDownMenu

EnableAnalytics

Gets or sets a value indicating whether the Analytics functionality is enabled or disabled for this control.

Declaration
public bool EnableAnalytics { get; set; }
Property Value
System.Boolean

Implements
IAnalyticsProvider.EnableAnalytics

ImageList

Gets or sets the ImageList that contains the images displayed by this control.

Declaration
public ImageList ImageList { get; set; }
Property Value
System.Windows.Forms.ImageList

Items

Gets menu items collection

Declaration
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection

ThemeName

Gets or sets control's preferred theme name. Themes are stored and retrieved using APIs of ThemeResolutionService.

Declaration
public string ThemeName { get; set; }
Property Value
System.String

Remarks

If ThemeResolutionService.ApplicatonThemeName refers to a non-empty string, the theme of a RadControl can differ from the one set using RadControls.ThemeName property. If the themes differ, the RadControls.ThemeName property will be overridden by ThemeResolutionService.ApplicatonThemeName. If no theme is registered with a name as ThemeResolutionService.ApplicatonThemeName, then control will revert to the theme specified by its ThemeName property. If ThemeName is assigned to a non-existing theme name, the control may have no visual properties assigned, which will cause it look and behave in unexpected manner. If ThemeName equals empty string, control's theme is set to a theme that is registered within ThemeResolutionService with the name "ControlDefault".

Methods

Dispose(Boolean)

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

OnDropDownClosed()

Raises the DropDownClosed event.

Declaration
protected virtual void OnDropDownClosed()

OnDropDownClosing(CancelEventArgs)

Raises the DropDownClosing event.

Declaration
protected virtual void OnDropDownClosing(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs args

The event arguments

OnDropDownOpened()

Raises the DropDownOpened event.

Declaration
protected virtual void OnDropDownOpened()

OnDropDownOpening(CancelEventArgs)

Raises the DropDownOpening event.

Declaration
protected virtual void OnDropDownOpening(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs args

The event arguments

Show()

Displays the context menu in its default position.

Declaration
public void Show()

Show(Point)

Displays the context menu relative to the specified screen location.

Declaration
public void Show(Point point)
Parameters
System.Drawing.Point point

The horizontal and vertical location of the screen's upper-left corner, in pixels.

Show(Point, RadDirection)

Positions the context menu relative to the specified screen location and with the specified direction.

Declaration
public void Show(Point point, RadDirection popupDirection)
Parameters
System.Drawing.Point point

The horizontal and vertical location of the screen's upper-left corner, in pixels.

RadDirection popupDirection

One of the RadDirection values.

Show(Int32, Int32)

Displays the context menu relative to the specified screen location.

Declaration
public void Show(int x, int y)
Parameters
System.Int32 x

The horizontal screen coordinate, in pixels.

System.Int32 y

The vertical screen coordinate, in pixels.

Show(Control, Point)

Positions the context menu relative to the specified control location.

Declaration
public void Show(Control control, Point point)
Parameters
System.Windows.Forms.Control control

The control that is the reference point for the RadDropDownMenu position.

System.Drawing.Point point

The horizontal and vertical location of the reference control's upper-left corner, in pixels.

Show(Control, Point, RadDirection)

Positions the context menu relative to the specified control location and with the specified direction.

Declaration
public void Show(Control control, Point point, RadDirection popupDirection)
Parameters
System.Windows.Forms.Control control

The control that is the reference point for the RadDropDownMenu position.

System.Drawing.Point point

The horizontal and vertical location of the reference control's upper-left corner, in pixels.

RadDirection popupDirection

One of the RadDirection values.

Show(Control, Int32, Int32)

Positions the context menu relative to the specified control location.

Declaration
public void Show(Control control, int x, int y)
Parameters
System.Windows.Forms.Control control

The control that is the reference point for the RadDropDownMenu position.

System.Int32 x

The horizontal coordinate relative to the control, in pixels.

System.Int32 y

The vertical coordinate relative to the control, in pixels.

Show(RadItem, Point)

Positions the context menu relative to the specified RadItem location.

Declaration
public void Show(RadItem item, Point point)
Parameters
RadItem item

The RadItem that is the reference point for the RadDropDownMenu position.

System.Drawing.Point point

The horizontal and vertical location of the RadItem's upper-left corner, in pixels.

Show(RadItem, Point, RadDirection)

Positions the context menu relative to the specified RadItem location and with the specified direction.

Declaration
public void Show(RadItem item, Point point, RadDirection popupDirection)
Parameters
RadItem item

The RadItem that is the reference point for the RadDropDownMenu position.

System.Drawing.Point point

The horizontal and vertical location of the RadItem's upper-left corner, in pixels.

RadDirection popupDirection

One of the RadDirection values.

Show(RadItem, Int32, Int32)

Positions the context menu relative to the specified RadItem location.

Declaration
public void Show(RadItem item, int x, int y)
Parameters
RadItem item

The RadItem that is the reference point for the RadDropDownMenu position.

System.Int32 x

The horizontal coordinate relative to the control, in pixels.

System.Int32 y

The vertical coordinate relative to the control, in pixels.

Show(RadItem, Int32, RadDirection)

Positions the context menu relative to the specified RadItem location and with specified direction and offset according to the owner.

Declaration
public void Show(RadItem item, int ownerOffset, RadDirection popupDirection)
Parameters
RadItem item

The RadItem that is the reference point for the RadDropDownMenu position.

System.Int32 ownerOffset

Specifies the offset from the owner in pixels.

RadDirection popupDirection

One of the RadDirection values.

Events

DropDownClosed

Occurs when the drop down is closed.

Declaration
public event EventHandler DropDownClosed
Event Type
System.EventHandler

DropDownClosing

Occurs when the drop down is closing.

Declaration
public event CancelEventHandler DropDownClosing
Event Type
System.ComponentModel.CancelEventHandler

DropDownOpened

Occurs when the drop down is opened.

Declaration
public event EventHandler DropDownOpened
Event Type
System.EventHandler

DropDownOpening

Occurs when the drop down is opening.

Declaration
public event CancelEventHandler DropDownOpening
Event Type
System.ComponentModel.CancelEventHandler

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.