Spread ASP.NET 16
Spread for ASP.NET 16 Product Documentation / Client-Side Scripting Reference / Scripting Members / Classes / MenuItem
In This Topic
    MenuItem
    In This Topic

    The MenuItem class consists of the following members.

    Constructor Description
    public MenuItem(); Initializes a new instance of the MenuItem class
    public MenuItem(text); Initializes a new instance of the MenuItem class with the displayed text value
    public MenuItem(text, imageUrl); Initializes a new instance of the MenuItem class with the displayed text value and icon image Url

     

    Property Description
    public Array Items {get;} Accesses the child item list
    public bool Enabled{get;set;} Gets or sets a value that indicates whether this menu item is enabled
    public string ImageUrl {get;set;} Gets or sets the image URL
    public MenuItem Parent {get;} Gets the parent of this menu item
    public string Text {get;set;} Gets or sets the displayed text of the menu item
    public string ToolTip {get;set;} Gets or sets the menu item tooltip
    public string CssClass {get;set;} Gets or sets Cascading Style Sheet (CSS) class of the menu item

     

    Method Description
    public void AddEventListener(eventName: string, listener: EventListener); Registers an event listener on the event target object
    public void RemoveEventListener(eventName: string, listener: EventListener); Unregisters an event listener on the event target object

     

    Event Description
    public event Clicked(EventArgs); Occurs when the menu item is selected