Class RadContextMenu
Represents a context menu
Inheritance
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)
Properties
AnalyticsName
Declaration
public string AnalyticsName { get; set; }
Property Value
System.String
|
Implements
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
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
|