Class Menu
The Menu control supports displaying a Menu created from list items. The Menu is based on a hierarchy of UL and LI elements where the list items are rendered as sub-menu items.
Implements
Inherited Members
Namespace: Syncfusion.JavaScript
Assembly: Syncfusion.EJ.dll
Syntax
public class Menu : Control, IHtmlString
Constructors
Menu()
Initializes a new instance of the Menu class.
Declaration
public Menu()
Menu(String, MenuProperties)
Initializes a new instance of the Menu class by the specified id and the Autocomplete properties.
Declaration
public Menu(string id, MenuProperties propModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
MenuProperties | propModel |
Properties
MenuModel
Gets or sets the Menu properties to the model.
Declaration
public MenuProperties MenuModel { get; set; }
Property Value
Type | Description |
---|---|
MenuProperties |
Model
Instance of control properties class
Declaration
protected override object Model { get; }
Property Value
Type | Description |
---|---|
System.Object |
Overrides
PluginName
Gets the plugin name of the Autocomplete element as 'ejMenu'.
Declaration
public override string PluginName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
TagName
Gets the tag name of the Menu element as 'ul'.
Declaration
public override string TagName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
CreateContainer(String)
Represents an HTML-encoded string of the Menu control that should not be encoded again.
Declaration
public override HtmlString CreateContainer(string controlId)
Parameters
Type | Name | Description |
---|---|---|
System.String | controlId |
Returns
Type | Description |
---|---|
System.Web.HtmlString |
Overrides
CreateUnObtrusiveContainer(String)
Declaration
public override HtmlString CreateUnObtrusiveContainer(string controlId)
Parameters
Type | Name | Description |
---|---|---|
System.String | controlId |
Returns
Type | Description |
---|---|
System.Web.HtmlString |
Overrides
RenderControl(String)
Represents an HTML element of the Menu control.
Declaration
public override void RenderControl(string controlId)
Parameters
Type | Name | Description |
---|---|---|
System.String | controlId |
Overrides
RenderItems()
Renders the Menu items.
Declaration
protected string RenderItems()
Returns
Type | Description |
---|---|
System.String | This method returns string value |
RenderMenuTemplate(MenuBaseItem, HtmlTag)
Renders the Menu template.
Declaration
protected HtmlTag RenderMenuTemplate(MenuBaseItem item, HtmlTag divTag)
Parameters
Type | Name | Description |
---|---|---|
MenuBaseItem | item | The item |
HtmlTag | divTag | The division tag |
Returns
Type | Description |
---|---|
HtmlTag | This method returns html element |