Submenu Style XML Demo

This demo illustrates how you can apply a style specifically to the submenus. For example, you might want to have a border around each submenu, as shown in this demo. This can be accomplished by creating a CSS class like so:

<style type="text/css">
	.subMenu
	{
		BORDER-RIGHT: black thin solid; 
		BORDER-TOP: black thin solid; 
		BORDER-LEFT: black thin solid; 
		BORDER-BOTTOM: black thin solid;
	}
</style>

After that, you simply set the skmMenu's SubMenuCSSClass property to subMenu (the name of the class defined above).

View the XML file bound to the DataGrid, SubmenuStyleXML.xml...



Source Code
HTML Portion:
				
<%@ Register TagPrefix="cc1" Namespace="skmMenu" Assembly="skmMenu" %>
<style type="text/css">
	.subMenu
	{
		BORDER-RIGHT: black thin solid; 
		BORDER-TOP: black thin solid; 
		BORDER-LEFT: black thin solid; 
		BORDER-BOTTOM: black thin solid;
	}
</style>


<cc1:Menu id="Menu2" runat="server" Font-Names="Microsoft Sans Serif" Font-Size="9.5pt" BackColor="#E0E0E0"
	Cursor="Pointer" ItemSpacing="0" ItemPadding="5" HighlightTopMenu="False" Layout="Horizontal"
	SubmenuCSSClass="subMenu">
	<SelectedMenuItemStyle BackColor="#FFC080"></SelectedMenuItemStyle>
</cc1:Menu>
				
Code-Behind Code:
				
private void Page_Load(object sender, System.EventArgs e)
{
	Menu1.DataSource = Server.MapPath("SubmenuStyleXML.xml");
	Menu1.DataBind();
}