Views: 1902
Rating: 0
MTDropDownMenu
Submitted By: root
Licence: LGPL
Class for rendering drop down menubars (like those in you OS GUI) using pure CSS (where aplicable) and JavaScript (for IE, which does not support :hover).
MTDropDownMenu class.
Class for rendering drop down menubars (like those in you OS GUI) using pure CSS (where aplicable) and JavaScript (for IE, which does not support :hover).
If you are using this component then you MUST ensure you have System.Web.UI.THead in your template or it will not work.
It is best practise to always specify CssClass for this component so existing ul tags would not get MTDropDownMenu CSS applied.
You can add MTDropDownMenuItem and MTDropDownMenuSeparator as controls children.
Properties:
* MenuWidth, string
sets width of menu items
* CssClass, string, kept in viewstate
sets class property of control. This must be unique if you have two menus with different MenuWidth's.
Code example:
<com:MTDropDownMenu>
<com:MTDropDownMenuItem HyperLink.Text="Link 1"
HyperLink.NavigateUrl="?page=Page.1">
<com:MTDropDownMenuItem HyperLink.Text="SubLink 1" />
<com:MTDropDownMenuItem HyperLink.Text="SubLink 2" />
</com:MTDropDownMenuItem>
<com:MTDropDownMenuItem HyperLink.Text="Link 2"
HyperLink.NavigateUrl="?page=Page.2" />
</com:MTDropDownMenu>
MTDropDownMenuItem class.
Provides items which can be added to MTDropDownMenu control. Items can be nested. For example lookup MTDropDownMenu.
Properties:
* HyperLink.*, System.Web.UI.WebControls.THyperLink inside this control.
* HasControlsClass, string,
if this component has child controls it sets CssClass property to HasControlsClass. Default: 'HasControls'.
* ZIndex, integer
z-index CSS tag for ul HTML tag (submenu). Each level gets automatically incremented. Starts from 1.
MTDropDownMenuSeparator class.
This control is MTDropDownMenuItem which acts as separator. It renders hr HTML tag.
This component cannot have any child controls neither it has any properties.