| |
| EasyMenu Documentation for .NET - Server side
|
| | |
OboutInc.EasyMenu
namespace
<%@ Register TagPrefix="oem" Namespace="OboutInc.EasyMenu_Pro" Assembly="obout_EasyMenu_Pro" %>
Methods
AddMenuItem
|
Adds a new MenuItem to the menu.
AddMenuItem(id, innerHtml, icon, url, urlTarget, onClientClick)
-
id - Component ID.
-
innerHtml - Text or HTML to display inside the MenuItem.
Optional
-
icon - Icon to display for the MenuItem.
Optional
-
url - Url to open when item is clicked.
Optional
-
urlTarget - Frame where the url is to be opened.
Optional
-
onClientClick - Javascript code to execute when item is clicked.
Optional
oem.AddMenuItem("menuItem1", "Our Products", null, null, null, null);
|
AddMenuItemAt
|
Adds a new MenuItem to the menu at the specified index.
AddMenuItemAt(index, id, innerHtml, icon, url, urlTarget, onClientClick)
-
index - The index where the item is to be added to.
-
id - Component ID.
-
innerHtml - Text or HTML to display inside the MenuItem.
Optional
-
icon - Icon to display for the MenuItem.
Optional
-
url - Url to open when item is clicked.
Optional
-
urlTarget - Frame where the url is to be opened.
Optional
-
onClientClick - Javascript code to execute when item is clicked.
Optional
oem.AddMenuItemAt(1, "menuItem1", "Our Products", null, null, null, null);
|
AddSeparator
|
Adds a new MenuSeparator to the menu.
AddSeparator(id, innerHtml)
-
id - Component ID.
-
innerHtml - Text or HTML to display inside the item.
Optional
oem.AddSeparator("menuSeparator1", "<hr noshade size= 1>");
|
AddSeparatorAt
|
Adds a new MenuSeparator to the menu at the specified index.
AddSeparatorAt(index, id, innerHtml)
-
index - The index where the item is to be added to.
-
id - Component ID.
-
innerHtml - Text or HTML to display inside the item.
Optional
oem.AddSeparatorAt(1, "menuSeparator1", "<hr noshade size= 1>");
|
AddItem
|
Adds a new item to the menu.
AddItem(item)
-
item - Any control derived from ItemBase to add to the menu.
oem.AddItem(new MenuItem("menuItem1", "Our Products"));
|
AddItemAt
|
Adds a new item to the menu at the specified index.
AddItemAt(index, item)
-
index - The index where the MenuComponent derivate is to be added to.
-
item - Any control derived from ItemBase to add to the menu.
oem.AddItemAt(1, new MenuItem("menuItem1", "Our Products"));
|
RemoveItem
|
Removes existing item from the menu.
RemoveItem(item)
-
item - An existing control derived from ItemBase to remove from the menu.
oem.RemoveItem(menuItem1);
|
RemoveItemAt
|
Removes existing item from the menu from the specified index.
RemoveItemAt(index)
-
index - The index from where the MenuComponent derivate will be removed.
oem.RemoveItemAt(1);
|
|
|
|
|
Menu Settings
Properties - Styles
CSSMenu
|
The CSS class name of the menu.
Optional
|
CSSMenuItemContainer
|
The CSS class name of the menu container.
Optional
|
CSSClasses
|
A CSSClasses object is a collection of css classes names for the different stages of any item that can be added to the menu.
It has the following properties:
-
ObjectType - The fully qualified name for the type of the item that this collection refers to. (read only)
-
AppliesTo - The short name for the type of the item that this collection refers to. (read only)
-
Component - The CSS class name for the item.
-
ComponentOver - The CSS class name for the item on mouse over.
-
ComponentLeftRoundCornerCell - The CSS class name for the item's left rounded cell.
-
ComponentLeftRoundCornerCellOver - The CSS class name for the item's left rounded cell on mouse over.
-
ComponentIconCell - The CSS class name for the item's icon cell.
-
ComponentIconCellOver - The CSS class name for the item's icon cell on mouse over.
-
ComponentContentCell - The CSS class name for the item's content cell.
-
ComponentContentCellOver - The CSS class name for the item's content cell on mouse over.
-
ComponentSubMenuCell - The CSS class name for the item's sub menu cell.
-
ComponentSubMenuCellOver - The CSS class name for the item's sub menu cell on mouse over.
-
ComponentRightRoundCornerCell - The CSS class name for the item's right rounded cell.
-
ComponentRightRoundCornerCellOver - The CSS class name for the item's right rounded cell on mouse over.
An item is any control derived from ItemBase.
|
CSSClassesCollection
|
Collection of CSSClasses.
Entries are added automatically to this collection upon adding a new item to the menu. There can be only one CSSClasses entry for a type of item that the menu contains. If an item is added to the menu and a
CSSClasses object for it already exists then no new entry is created for it.
Example:
// a new MenuItem is added to the menu and automatically a new
// CSSClasses with ObjectType=MenuItem is added to the
// CSSClassesCollection and can be edited
oem.AddMenuComponent(new MenuItem("menuItem1", "Our Products"));
// a CSSClasses entry for MenuItem type is already in the collection
// so a new entry for it is not created
oem.AddMenuComponent(new MenuItem("menuItem2", "Our Clients"));
// no entry for MenuSeparator is found in the collection so a new
// CSSClasses one is created
oem.AddMenuComponent(new MenuSeparator("menuSeparator1"));
// modify the class name for the MenuItem type
// both menuItem1 and menuItem2 will use this new css class name!
oem.CSSClassesCollection["MenuItem"].Component = "myNewMenuItemClass";
|
|
|
|
|
MenuItem Properties
MenuSeparator Properties
ID
|
Component ID.
|
InnerHtml
|
Text or HTML to display inside the MenuSeparator.
Optional
|
AllowsIcon
|
Whether this MenuSeparator allows an icon to be displayed for it or not (only
used if menu UseIcons is true).
Optional
|
Icon
|
Icon to display for the MenuSeparator.
Optional
|
|
|
|
|
| "WOW! Now you are cooking with gas! oBout rocks my world. You guys are the best.
Kudos! I will continue to recommend you to all of my developer buddies." |
Joshua Richards |
| Liquid Circuit, LLC |
| | |
|
|
|
|