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 RadContextMenu

Represents a context menu that can be associated with controls or elements to provide contextual menu functionality.

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()

Initializes a new instance of the RadContextMenu class.

Declaration
public RadContextMenu()

RadContextMenu(IContainer)

Initializes a new instance of the RadContextMenu class with the specified container.

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

The container that owns this context menu.

RadContextMenu(RadElement)

Initializes a new instance of the RadContextMenu class with the specified owner element.

Declaration
public RadContextMenu(RadElement ownerElement)
Parameters
RadElement ownerElement

The RadElement that owns this context menu.

Properties

AnalyticsName

Gets or sets the Analytics Name associated with this control.

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

Implements
IAnalyticsProvider.AnalyticsName

AnimationEnabled

Gets or sets a value indicating whether popup animation is enabled when the context menu opens and closes.

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

true if animation is enabled; otherwise, false. The default value is true.

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 the underlying dropdown menu panel that manages the display and behavior of the context menu.

Declaration
public RadDropDownMenu DropDown { get; }
Property Value
RadDropDownMenu

A RadDropDownMenu representing the dropdown panel.

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 image list that contains the images displayed by menu items in this context menu.

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

An ImageList containing the images for menu items. The default value is null.

Items

Gets the collection of menu items contained in this context menu.

Declaration
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection

A RadItemOwnerCollection containing the menu items.

ThemeName

Gets or sets the theme name for customizing the visual appearance of the context menu.

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

A string representing the theme name. The default value is an empty 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 context menu dropdown has closed.

Declaration
public event EventHandler DropDownClosed
Event Type
System.EventHandler

DropDownClosing

Occurs when the context menu dropdown is about to close.

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

DropDownOpened

Occurs when the context menu dropdown has opened.

Declaration
public event EventHandler DropDownOpened
Event Type
System.EventHandler

DropDownOpening

Occurs when the context menu dropdown is about to open.

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