Class MenuPropertiesBuilder
Inheritance
Inherited Members
Namespace: Syncfusion.JavaScript
Assembly: Syncfusion.EJ.dll
Syntax
public class MenuPropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
MenuPropertiesBuilder()
Initializes a new instance of the MenuPropertiesBuilder class.
Declaration
public MenuPropertiesBuilder()
MenuPropertiesBuilder(Menu)
Creates a new instance of MenuPropertiesBuilder class.
Declaration
public MenuPropertiesBuilder(Menu menu)
Parameters
Type | Name | Description |
---|---|---|
Menu | menu | Accepts the Menu properties |
Fields
menu
Creates a new instance of Menu class.
Declaration
public Menu menu
Field Value
Type | Description |
---|---|
Menu |
Methods
AnimationType(AnimationType)
Specifies the Animation to enable or disable while hover or click an menu items.
Declaration
public MenuPropertiesBuilder AnimationType(AnimationType animation)
Parameters
Type | Name | Description |
---|---|---|
AnimationType | animation | animation |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns enum value |
ClientSideEvents(Action<MenuClientSideEventsBuilder>)
Menu ClientSideEvents
Declaration
public MenuPropertiesBuilder ClientSideEvents(Action<MenuClientSideEventsBuilder> clientSideEvents)
Parameters
Type | Name | Description |
---|---|---|
System.Action<MenuClientSideEventsBuilder> | clientSideEvents | clientSideEvents |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns menu properties builder value |
Container(String)
Specifies the container id of sub menu. On clicking the specified sub menu element, sub menu gets shown.
Declaration
public MenuPropertiesBuilder Container(string containerTarget)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerTarget |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
ContextMenuTarget(String)
Specifies the target id of context menu. On right clicking the specified contextTarget element, context menu gets shown.with string argument.
Declaration
public MenuPropertiesBuilder ContextMenuTarget(string contextTarget)
Parameters
Type | Name | Description |
---|---|---|
System.String | contextTarget | contextTarget |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
CssClass(String)
Specify the CSS class to achieve custom theme.with string argument.
Declaration
public MenuPropertiesBuilder CssClass(string cssClass)
Parameters
Type | Name | Description |
---|---|---|
System.String | cssClass | cssClass |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
EnableCenterAlign()
Specifies the root menu items to be aligned center in horizontal menu.
Declaration
public MenuPropertiesBuilder EnableCenterAlign()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
EnableCenterAlign(Boolean)
Specifies the root menu items to be aligned center in horizontal menu.with boolean argument.
Declaration
public MenuPropertiesBuilder EnableCenterAlign(bool centerAlign)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | centerAlign | centerAlign |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
Enabled()
Enable / Disable the Menu control.
Declaration
public MenuPropertiesBuilder Enabled()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
Enabled(Boolean)
Enable / Disable the Menu control.with boolean argument.
Declaration
public MenuPropertiesBuilder Enabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | enabled |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
EnableRTL()
Specifies the menu items to be displayed in right to left direction.
Declaration
public MenuPropertiesBuilder EnableRTL()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
EnableRTL(Boolean)
Specifies the menu items to be displayed in right to left direction.with boolean argument.
Declaration
public MenuPropertiesBuilder EnableRTL(bool rtl)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | rtl | rtl |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
EnableSeparator()
When this property sets to false, the menu items is displayed without any separators.
Declaration
public MenuPropertiesBuilder EnableSeparator()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
EnableSeparator(Boolean)
When this property sets to false, the menu items is displayed without any separators.with boolean argument.
Declaration
public MenuPropertiesBuilder EnableSeparator(bool enableSeparator)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enableSeparator | enableSeparator |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
ExcludeTarget(String)
Specifies the target which needs to be excluded. i.e., The context menu will not be displayed in those specified targets.with string argument.
Declaration
public MenuPropertiesBuilder ExcludeTarget(string excludeTarget)
Parameters
Type | Name | Description |
---|---|---|
System.String | excludeTarget | excludeTarget |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
Height(String)
Specifies the height of the root menu.with string argument.
Declaration
public MenuPropertiesBuilder Height(string height)
Parameters
Type | Name | Description |
---|---|---|
System.String | height | height |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
HtmlAttributes(IDictionary<String, Object>)
Specifies the list of html attributes to be added to menu control.
Declaration
public MenuPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | itemHtmlAttributes | itemHtmlAttributes |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns object value |
IsResponsive()
Enables/Disables the responsive support for Menu items during the window resizing time.
Declaration
public MenuPropertiesBuilder IsResponsive()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
IsResponsive(Boolean)
Enables/Disables the responsive support for Menu items during the window resizing time.A boolean variable isResponsive is passed.
Declaration
public MenuPropertiesBuilder IsResponsive(bool isResponsive)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isResponsive | isResponsive |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
Items(Action<MenuBaseItemAdder>)
Specifies the menu items
Declaration
public MenuPropertiesBuilder Items(Action<MenuBaseItemAdder> items)
Parameters
Type | Name | Description |
---|---|---|
System.Action<MenuBaseItemAdder> | items |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns menu properties builder value |
Locale(String)
Different culture can be given locale property, Text present in title text will be localized to respective culture.
Declaration
public MenuPropertiesBuilder Locale(string locale)
Parameters
Type | Name | Description |
---|---|---|
System.String | locale |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder |
MenuFields(Action<MenuFieldsBuilder>)
Fields used to bind the data source and it includes following field members to make databind easier.with object argument.
Declaration
public MenuPropertiesBuilder MenuFields(Action<MenuFieldsBuilder> fields)
Parameters
Type | Name | Description |
---|---|---|
System.Action<MenuFieldsBuilder> | fields | fields |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns object value |
MenuType(MenuType)
Specifies the type of the menu. Essential JavaScript Menu consists of two type of menu, they are Normal Menu and Context Menu mode.with enumeration argument.
Declaration
public MenuPropertiesBuilder MenuType(MenuType menuType)
Parameters
Type | Name | Description |
---|---|---|
MenuType | menuType | menuType |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string|enum value |
OpenOnClick()
Specifies the sub menu items to be show or open only on click.
Declaration
public MenuPropertiesBuilder OpenOnClick()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
OpenOnClick(Boolean)
Specifies the sub menu items to be show or open only on click.with boolean argument.
Declaration
public MenuPropertiesBuilder OpenOnClick(bool openOnClick)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | openOnClick | openOnClick |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
Orientation(Orientation)
Specifies the orientation of normal menu. Normal menu can rendered in horizontal or vertical direction by using this API.with enumeration argument.
Declaration
public MenuPropertiesBuilder Orientation(Orientation orientation)
Parameters
Type | Name | Description |
---|---|---|
Orientation | orientation | orientation |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string|enum value |
OverflowHeight(String)
Specifies the height of the overflow menu with string argument.
Declaration
public MenuPropertiesBuilder OverflowHeight(string overflowHeight)
Parameters
Type | Name | Description |
---|---|---|
System.String | overflowHeight | overflowHeight |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
OverflowWidth(String)
Specifies the width of the overflow menu with string argument.
Declaration
public MenuPropertiesBuilder OverflowWidth(string overflowWidth)
Parameters
Type | Name | Description |
---|---|---|
System.String | overflowWidth |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
Render()
Renders this instance.
Declaration
public void Render()
ShowRootLevelArrows()
Specifies the main menu items arrows only to be shown if it contains child items.
Declaration
public MenuPropertiesBuilder ShowRootLevelArrows()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
ShowRootLevelArrows(Boolean)
Specifies the main menu items arrows only to be shown if it contains child items.with boolean argument.
Declaration
public MenuPropertiesBuilder ShowRootLevelArrows(bool showRootLevelArrows)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | showRootLevelArrows | showRootLevelArrows |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
ShowSubLevelArrows()
Specifies the sub menu items arrows only to be shown if it contains child items.
Declaration
public MenuPropertiesBuilder ShowSubLevelArrows()
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
ShowSubLevelArrows(Boolean)
Specifies the sub menu items arrows only to be shown if it contains child items.with boolean argument.
Declaration
public MenuPropertiesBuilder ShowSubLevelArrows(bool showSubLevelArrows)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | showSubLevelArrows | showSubLevelArrows |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns boolean value |
SubMenuDirection(Direction)
Specifies position of pulldown submenus that will appear on mouse over.
Declaration
public MenuPropertiesBuilder SubMenuDirection(Direction subMenuDirection)
Parameters
Type | Name | Description |
---|---|---|
Direction | subMenuDirection | subMenuDirection |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string|enum value |
TitleText(String)
Specifies the title to responsive menu.with string argument.
Declaration
public MenuPropertiesBuilder TitleText(string menuTitle)
Parameters
Type | Name | Description |
---|---|---|
System.String | menuTitle | menuTitle |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |
ToHtmlString()
Returns an HTML-encoded string.
Declaration
public string ToHtmlString()
Returns
Type | Description |
---|---|
System.String |
Width(String)
Specifies the width of the main menu.with string argument.
Declaration
public MenuPropertiesBuilder Width(string width)
Parameters
Type | Name | Description |
---|---|---|
System.String | width |
Returns
Type | Description |
---|---|
MenuPropertiesBuilder | This method returns string value |